Тёмный
No video :(

What is Route Guard in Angular | Angular Routing | Angular 13+ 

procademy
Подписаться 53 тыс.
Просмотров 22 тыс.
50% 1

In this lecture, we will have a look at Angular Route Guards. The Angular supports several route guards like CanActivate, CanDeactivate, Resolve, CanLoad, and CanActivateChild. These guards help us to secure the route or to perform some actions before navigating into a route or leaving the route.
We use the Angular Guards to control, whether the user can navigate to or away from the current route.
We looked at how to configure our routes and navigate to the different parts of our application using Angular Router. Allowing the user to navigate to all parts of the application is not a good idea. We need to restrict the user until the user performs specific actions like login. Angular provides the Route Guards for this same purpose.
One of the common scenario, where we use Route guards is authentication. We want our App to stop the unauthorized user from accessing the protected route. We can achieve this by using a route guard in Angular.
Uses of Angular Route Guards
- To Confirm the navigational operation
- Asking whether to save before moving away from a view
- Allow access to certain parts of the application to specific users
- Validating the route parameters before navigating to the route
- Fetching some data before you display the component.
The Angular Router supports Five different guards, which you can use to protect the route
- CanActivate
- CanDeactivate
- Resolve
- CanLoad
- CanActivateChild
DOWNLOAD SECTION SOURCE CODE HERE: drive.google.c...

Опубликовано:

 

26 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 5   
@Karthik22ng
@Karthik22ng Год назад
My Notes: Route Guard secure the route used in authentication 5 Interfaces 1. canActivate 2. canDeactivate 3. Resolve 4. canLoad 5. canActivateChild Create an injectable service which implements from any one of above 5 interface and implement the members ofthe interface if the method returns true, it is valid, else to cancel. register the service in providers of appmodule use the service in the routes array for any route using above 5 property name
@zameershaikh4324
@zameershaikh4324 Год назад
Good Job🙂
@kolawoleomotosho3073
@kolawoleomotosho3073 Год назад
You did not teach about CanLoad Guard in this playlist
@maheshsirsat1811
@maheshsirsat1811 Год назад
Done
@kavitalokhande3166
@kavitalokhande3166 Год назад
Please add canload video
Далее
Whoa
01:00
Просмотров 22 млн
What’s new in Angular v18
20:08
Просмотров 118 тыс.
Role Based Authorization in Angular: How It Works
11:05
CanActivate Route Guard - Angular (Tutorial #24)
11:58
Angular route guards
12:46
Просмотров 83 тыс.
Directives in Angular Applications
25:13
Просмотров 179 тыс.
Lazy loading in angular
10:48
Просмотров 134 тыс.
Pipes in Angular | Angular Pipes | Angular 13+
14:15
Просмотров 14 тыс.