CanActivate
The
canActivate
guard is the default mechanism of adding permissions to the application. To see how we can use it, let's take the example from preceding code and remove lazy loading:
const ROUTES = [ { path: ':folder', children: [ { path: '', component: ConversationsCmp }, { path: ':id', component: ConversationCmp, children: [...] } ] }, { path: 'contacts', canActivate: [CanActivateContacts], children: [ { path...