CanDeactivate Route Guard - Angular (Tutorial #26)

Опубликовано: 07 Август 2026
на канале: Nisha Singla
22,127
483

CanDeactivate Route Guard in Angular - Tutorial no. 26

The Angular CanDeactivate guard is called, whenever we navigate away from the route before the current component gets deactivated.

The best use case for CanDeactivate guard is the data entry component.
The user may have filled the data entry and tries to leave that component without saving his work.
The CanDeactivate guard gives us a chance to warn the user that he has not saved his work and give him a chance to cancel the navigation

Use this link to share this video :   • CanDeactivate Route Guard - Angular (Tutor...  

You can also visit my following videos:
CanActivateRouteGuard:    • CanActivate Route Guard - Angular (Tutoria...  
CanActivateChild Route Guard:    • CanActivateChild Route Guard - Angular (Tu...  
Nested Routing:    • Nested Routes - Angular (Tutorial #22)  
Router Parameters:    • Route Parameters - Angular (Tutorial #21)  
Routing:    • Routing - Angular (Tutorial #20)  



Angular Tutorial Series:
   • Introduction- Angular (Tutorial #1)  

Follow me on:
►Youtube :    / nishasingla  
►Facebook :   / angularjs4beginners  
►LinkedIn :   / nishasingla