Página de atualização angular 8 ts
refresh(): void {
window.location.reload();
}
Mostafa Bazyar
refresh(): void {
window.location.reload();
}
this.router.navigate(['path/to'])
.then(() => {
window.location.reload();
});
refresh(): void {
window.location.reload();
}
reloadCurrentRoute() {
let currentUrl = this._router.url;
this._router.navigateByUrl('/', {skipLocationChange: true}).then(() => {
this._router.navigate([currentUrl]);
console.log(currentUrl);
});
}
reloadComponent() {
let currentUrl = this.router.url;
this.router.routeReuseStrategy.shouldReuseRoute = () => false;
this.router.onSameUrlNavigation = 'reload';
this.router.navigate([currentUrl]);
}
reloadCurrentRoute() {
let currentUrl = this.router.url;
this.router.navigateByUrl('/', {skipLocationChange: true}).then(() => {
this.router.navigate([currentUrl]);
});
}