One more note regarding the canMatch guard I forgot to mentioned in the video: canMatch guard is being called during the "Route Recognizing" and "Applying Redirects" steps, so that's why the canMatch will be called 2 times. Keep in mind that and don't be surprised.
Thanks for video, nice information in short time, Please let me know how to avoid one of call from canMatch if it is called twice or How to detect "Route Recognizing" and "Applying Redirects" steps?
I have used CanMatch to display a login component. So i have 3 routes which, the first will render the login, if the user is not logged in. The second will redirect to dashboard and the third has the complete routings as children which has a canActivate guard (login)
He explains very well. I Google searched about canMatch and couldn't find anything as comprehensive as this video. I also bought his course on angular forms which is very detailed. I hope he could make more courses about other angular advanced topics and less about interview related things. There is really a lack of recent comprehensive courses/tutorials on angular, Decoded Frontend is the exception.
Thanks for the video! I published a library called `ngx-feature-flag-router`, and I'm happy to see that `CanMatch` will likely replace it completely. Thank you again for your video, time to look into a new idea
Great video and feature. I wish it was available months ago, I could have used it while doing similar thing when I needed to toggle routes based on feature flags
Brother please make videos more often a d please create a complete courses for rxjs and angular and please can you create a angular project with advance features. Like amazon filter search
Really like your videos everything is explained smoothly I have shared your content with my fellow angular Developers and they also liked it.. only one question i have do you have QnA link something where i can get help from you... Thanks
Great video! this opend up to more possibilities. But, I tried it in my own project and bum into and error: 'canMatch' does not exist in type 'Route'. angular. What it might be?
Hi. In the 2:41 you say data in the data resolving, Angular is resolving data. But you said exactly the same in the Route Config loading. What is the difference? Thank you.
Hi, Dmytro. I'm Nelson from Peru. When we using preloading-strategy for example PreloadAllModules, in this case "canLoad" will not be preloaded because it is protected by CanLoad route guard. Now what about canMatch is possible to do the same? Or how can I avoid to preload some modules?
Thanks for such a informative video, i just have one question is there any advantage of using isAdmin$ as observable then just a primitive boolean variable, i have seen this type of pattern at various places, still not fully satisfied when to use which...? Thanks I will highly appreciate incase anyone can comment on this issue
This is potentially useful for the project I'm working on. But how does this behave with a resolver? I'm doing the redirects on the resolver and ideally the redirect logic should be on this canMatch guard. Not sure how to use them both together..
Resolvers are being executed right before the route activation (after canActivate & canActivateChild successfully passed), so if canMatch return 'false' you won't even reach resolvers because canMatch guard will be executed as the very first one in the navigation lifecycle. But why do you do redirect logic inside the resolvers?
@@DecodedFrontend I use resolver to request information to pass to the component. But depending on the state of this item (has two states) I need to decide which route should take. In theory, from what I understood, canMatch would be a great candidate for this? But I can't figure out how I would use it.