i am trying to do a forced reload after a logout.
I am using NGRX and after a logout dispatch action, i am trying to:
this.router.navigated = false;
this.router.navigate(['/login']);
Because i need to reload a imported file at my Theme Component.
ngAfterViewInit() {
import('../../assets/js/scripts.bundle.js');
}
If I logout and try to login again, i am losing this JS, so a full reload can help me.
Any suggestions?
I cant put this .js on angular.json because i cant use him at a few pages.
I resolved with a href at logout button. Isnt the best solution i guess, but works.