reload component without refresh angular code example
Example 1: 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]);
}
Example 2: angular refresh page without reloading
this.router.navigate(['path/to'])
.then(() => {
window.location.reload();
});