Hey all, I just spotted the question by accident. I'll try to answer it in case you're still wondering, or for some future concern.
The difference is that canMatch
is being evaluated first, runs before you even look into the URL. Imagine that canMatch guard is only allowing admins in.
That means you can e.g. prevent even attempting to load the routes (e.g. lazily) if you know your current user is an admin. They try to open /site-settings or /users page or similar - and you just nope them back.
CanActivate, in contrast, will first go load the remote route, then try to match the user.
Now, you also asked why. Well, the difference is usually tiny, but it might make sense. Let's say you have some data loading, some actions being performed, some background sync operations running when you load a lazy route /admin. Example, you have /admin page, but when you load it, canActivate
router needs to go back to server and ask if this particular admin can administer this particular tenant. If you use canActivate, some of these are running always. And if you know your user is not an admin at all, you don't even try to load the module, and you save that time.
Tiny bit of difference, but it can help sometime.