angular trigger refresh component code example
Example 1: angular refresh page without reloading
this.router.navigate(['path/to'])
.then(() => {
window.location.reload();
});
Example 2: angular reload component
reloadCurrentRoute() {
let currentUrl = this.router.url;
this.router.navigateByUrl('/', {skipLocationChange: true}).then(() => {
this.router.navigate([currentUrl]);
});
}