ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

CanActivateChild Route Guard - Angular (Tutorial #25)

Автор: Nisha Singla

Загружено: 2020-05-11

Просмотров: 18317

Описание: CanActivateChild Route Guard in Angular - Tutorial no. 25

The Angular invokes CanActivateChild guard whenever the user tries to navigate to any of its child route.
This allows us check some condition and decide whether to proceed with the navigation or cancel it.

Use this link to share this video :   • CanActivateChild Route Guard - Angular (Tu...  

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

Guards in angular are interfaces which can tell the router whether or not it should allow navigation to a requested route.
So If all guards return true, navigation will continue. If any guard returns false, navigation will be cancelled.
Guards return either true if the user can access a route or false if they can’t.
They can also return an Observable or Promise that later on resolves to a boolean in case the guard can’t answer the question straight away,
for example it might need to call an API. Angular will keep the user waiting until the guard returns true or false.

There are five different types of Guards:

CanActivate
Checks to see if a user can visit a route.

CanActivateChild
Checks to see if a user can visit a routes children.

CanDeactivate
Checks to see if a user can exit a route.

Resolve
Performs route data retrieval before route activation.

CanLoad
Checks to see if a user can route to a module that lazy loaded.

For a given route we can implement zero or any number of Guards.

If we talk about the difference between canActivate and canActivateChild RouteGuard, then we can say
When we apply canActivateGuard it always check parent route accessibility. If Parent route is accessible, automatically its child routes are also accessible. But in some situation we may have some other criteria to check
before executing child route event when parent route is accessible.

CanActivateChild Guard is simply a service that implements the CanActivateChild interface and overrides the canActivateChild() method.
In this case, it always returns true which means access to child Routes will be always granted to the user when this guard is applied to a route.

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

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

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
CanActivateChild Route Guard - Angular (Tutorial #25)

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

CanDeactivate Route Guard - Angular (Tutorial #26)

CanDeactivate Route Guard - Angular (Tutorial #26)

CanActivate Route Guard - Angular (Tutorial #24)

CanActivate Route Guard - Angular (Tutorial #24)

RxJS Subject | What is RxJs Subject  - Angular (Tutorial 31)

RxJS Subject | What is RxJs Subject - Angular (Tutorial 31)

@ViewChild/@ViewChildren in Angular (Tutorial 35)

@ViewChild/@ViewChildren in Angular (Tutorial 35)

Игра, опередившая время на десятилетия  | The Movies 2005

Игра, опередившая время на десятилетия | The Movies 2005

Блокировка денег и внедрение цифрового рубля / Обострение на Ближнем Востоке || Дмитрий Потапенко*

Блокировка денег и внедрение цифрового рубля / Обострение на Ближнем Востоке || Дмитрий Потапенко*

Comedy Club: Курсы альфа-самца | Кравец, Шальнов, Бутусов @ComedyClubRussia

Comedy Club: Курсы альфа-самца | Кравец, Шальнов, Бутусов @ComedyClubRussia

Похудей на 45 КГ, Выиграй $250,000!

Похудей на 45 КГ, Выиграй $250,000!

Routing - Angular (Tutorial #20)

Routing - Angular (Tutorial #20)

Почему Близкие Предают, Когда Вы Начинаете Сиять | Макиавелли

Почему Близкие Предают, Когда Вы Начинаете Сиять | Макиавелли

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]