Angular · Middle · Question 30 of 75
How does canMatch differ from canActivate?
- ✓Correct answer:
canMatchdecides whether the route is considered at all, so lazy code isn't loaded and another route can match - 2They are identical;
canMatchis just the new name - 3
canMatchruns after the component is created
Explanation
With canMatch you can have two routes with the same path for different roles (/dashboard for admins and users), and an unauthorized user doesn't download the admin chunk.