【发布时间】:2019-12-11 00:04:58
【问题描述】:
我正在使用 Angular 8 并希望在同一位置上刷新我的组件 url 不刷新整个页面。我正在尝试使用 router.navigate 但 它不适合我。我试过
location.reload和window.location.reload但是它需要太多时间并且它会刷新 整个页面。下面是我的代码:
this.snackBar.open('Data Updated Successfully', 'Undo', {
duration: 5000,
});
this.router.navigate(['/get_customer_details/'+this.customer_details_id]);
console.log(this.customer_details_id);
this.ngOnInit();
【问题讨论】: