Topics
Published on June 11, 2018 by kudvenkat

In this video we will discuss implementing CanActivate guard in Angular with an example.

As the name implies CanActivate guard determines if a route can be activated. There are several use cases for CanActivate guard.

1. We can use it to check if the user is authenticated before allowing him to access protected areas of the application. If he is not authenticated, we redirect him to AccessDenied component or Login component.

2. Similarly we can use it to check, if a specific resource he is looking for exists. if the resource does not exist we redirect him to the PageNotFound component. If the resource exists, we redirect the user to navigate the resource.

Text version of the video
csharp-video-tutorials.blogspot.com/2018/06/angular-canactivate-guard-example.html

Slides
csharp-video-tutorials.blogspot.com/2018/06/angular-canactivate-guard-example-slides.html

Angular CRUD Tutorial

Angular CRUD Tutorial Text Articles & Slides
csharp-video-tutorials.blogspot.com/2017/12/angular-crud-tutorial.html

All Dot Net and SQL Server Tutorials in English
www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd

All Dot Net and SQL Server Tutorials in Arabic
www.youtube.com/c/KudvenkatArabic/playlists

Leave a Reply

5 Comments on "Angular canactivate guard example"

Notify of
avatar

SrJ4U All
Guest
SrJ4U All
12 days 16 hours ago

So useful

sumit bhardwaj
Guest
sumit bhardwaj
13 days 4 hours ago

Thank u sir u create a excellent content for us you are role model for many students but every want to know about you please make a video on self

Mohanraj Periasamy
Guest
Mohanraj Periasamy
13 days 6 hours ago

Thank you. Can you please make a video on how to debug the application. It's very important

ankit dixit
Guest
ankit dixit
13 days 7 hours ago

Nice sir I am a big fan

လင္းလြန္း ေလး
Guest
လင္းလြန္း ေလး
13 days 7 hours ago

please Laravel Tutorial.

wpDiscuz