I have created one router link as below. This router link loads ProductsStartComponent
and then this component loads several other components using ngif and not via
Just in case someone else encounters this problem. You need to call
window.location.reload()
And you cannot call this from a expression. If you want to call this from a click event you need to put this on a function:
(click)="realodPage()"
And simply define the function:
reloadPage() {
window.location.reload();
}
If you are changing the route, it might not work because the click event seems to happen before the route changes. A very dirty solution is just to add a small delay
reloadPage() {
setTimeout(()=>{
window.location.reload();
}, 100);
}