I'm facing an issue with my application where I need to reload the page, but it seems to be stuck in a loop and keeps reloading repeatedly.
ngOnInit() {
location.reload();
}
I attempted another approach:
ngOnInit() {
console.log("inited");
let win = (window as any);
if(win.location.hash !== '#/home?loaded' ) {
win.location = win.location + '#/home?loaded';
win.location.reload();
}
}
Unfortunately, both of these methods continue to reload the page incessantly. My goal is to only trigger a single reload.