CanMatch Guard in Angular 14.1 Router (2022)

Опубликовано: 16 Ноябрь 2024
на канале: Decoded Frontend
15,226
1k

Angular 14.1 comes with many useful features and in this video, we will have a look at one of them. Here I mean a brand-new CanMatch guard in Angular router that can help you to 'skip' routes depending on some certain conditions. This is quite different compared to already existing guards and brings even more flexibility to your Angular apps. I hope you will find this video useful :)

💥 Angular courses made by Dmytro - https://bit.ly/df-courses 💥
✂️ Use coupon YOUTUBE_DISCOUNT to get a 10%-off discount ✂️

🕒 Time Codes:
00:00:00 - Intro;
00:00:36 - Router navigation lifecycle;
00:04:55 - Project overview;
00:06:20 - canMatch router guard in action;
00:14:00 - Note 1 - How to redirect from canMatch guard;
00:15:00 - Note 2 - canMatch as an replacement for canLoad;
00:16:57 - Outro;

🔗 Source code on GitHub (init state on the master branch):
https://github.com/DMezhenskyi/angula...

💡 Short Frontend Snacks (Tips) every week here:
Twitter -   / decodedfrontend  
Instagram -   / decodedfrontend  
LinkedIn -   / dmezhenskyi