angular 8 ts refresh page
refresh(): void {
window.location.reload();
}
angular 8 ts refresh page
refresh(): void {
window.location.reload();
}
angular refresh page without reloading
this.router.navigate(['path/to'])
.then(() => {
window.location.reload();
});
page reload button using angular
at template use event buinding:
(click)="reloadCurrentPage()"
inside the .ts file, add the function,
reloadCurrentPage() {
window.location.reload();
}
How to Reload a Component in Angular
reloadComponent() {
let currentUrl = this.router.url;
this.router.routeReuseStrategy.shouldReuseRoute = () => false;
this.router.onSameUrlNavigation = 'reload';
this.router.navigate([currentUrl]);
}
angular reload component
reloadCurrentRoute() {
let currentUrl = this.router.url;
this.router.navigateByUrl('/', {skipLocationChange: true}).then(() => {
this.router.navigate([currentUrl]);
});
}
refresh page angular
refresh(): void {
window.location.reload();
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us