Before Angular 15, I used SCAM pattern in order to have one module per component/directive/pipe.
My app contains many lazy loaded pages (one module per page) with a CanLoad guard to prevent lazy loading (feature flags, ...).
Since Ng 15 (I'm on 15.0.4), I replaced all of my loadChildren
by loadComponent
(so, each pages became a standalone component). But... As I saw there :
CanLoad guards do not apply to loadComponent. canActivate should be used instead, just like you would do if it were simply
Problem : CanActivate doesn't prevent loading if needed. So now, all of my pages are loaded :(.
Is there a way to keep the "CanLoad" functionnality, but for loadComponent ?
Thanks !
EDIT : I tried with "canMatch" : It doesn't change anything.