how to run function on page reload angular code example
Example: angular refresh page without reloading
this.router.navigate(['path/to'])
.then(() => {
window.location.reload();
});
this.router.navigate(['path/to'])
.then(() => {
window.location.reload();
});