strona kątowa 8 ts Odśwież
refresh(): void {
window.location.reload();
}
Mostafa Bazyar
refresh(): void {
window.location.reload();
}
this.router.routeReuseStrategy.shouldReuseRoute = function(){
return false;
};
this.router.events.subscribe((evt) => {
if (evt instanceof NavigationEnd) {
// trick the Router into believing it's last link wasn't previously loaded
this.router.navigated = false;
// if you need to scroll back to top, here is the right place
window.scrollTo(0, 0);
}
});
<button (click)="refresh()">Refresh</button>