All Questions
Tagged with angular-route-guards candeactivate
4
questions
1
vote
3
answers
215
views
unable to perform CanDeactivateFn Karma Test Angular 16
I have a canDeactivateGuard which returns from component's MatDialog for unsaved action.
My problem is I am unable to test the functional guard and getting error -
TypeError: Cannot read properties of ...
1
vote
2
answers
346
views
Angular Can Deactivate - Material Dropdown
I have an implementation of Angular RouteGuard CanDeactivate. It works for input fields but its not working for drop downs. I also want to display my own modal and I can't get it work correctly.
This ...
2
votes
0
answers
740
views
Prevent navigation in ngDestroy angular
I want to prevent the user from navigating away from the current page if the form is dirty. While this works with CanDeactivate guard, the problem is when I try to move on to another child component ...
3
votes
1
answer
2k
views
TypeError: Cannot read property 'canDeactivate' of null in IONIC 5
I am unable to implement canDeactivate guard in Ionic 5. Following are my code.
model.ts
export interface isDeactivatable {
canDeactivate: () => Observable<boolean> | Promise<boolean&...