Can Deactivate guard runs only once in Angular
Can Deactivate guard runs only once in Angular Yes I know it is a duplicate issue but previous post does not solve it. Guard code: duplicate issue canDeactivate(component: ExamEndedComponent, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean { return this.store.select(fromRoot.getExamStatus) .pipe( take(1), map((res: string) => { console.log(res); if (res === 'started') { alert('stop'); console.log(currentState.url); return false; } return true; }) ); } but the problem is when clicking on back button of browser the guard executes only once so when clicking again user can actually navigate away . Also checked the issue in angular : https://github.com/angular/angular/issues/12851 but it tries to solve the issue by navigating again to the current rou...
