Last active
July 18, 2018 07:07
-
-
Save brachi-wernick/b2d6508566d1bf85194d7840c1899cc1 to your computer and use it in GitHub Desktop.
route config with permission in data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const appRoutes: Routes = [ | |
{ | |
path: 'crisis-center', component: CrisisListComponent, | |
canActivate: [CanActivateGuard], | |
data: { | |
permissions: ['CRISIS_READ'] | |
} | |
}, | |
{ | |
path: 'hero/:id', | |
component: HeroDetailComponent, | |
canActivate: [CanActivateGuard], | |
data: { | |
permissions: ['HERO_READ'] | |
} | |
{ | |
path: 'heroes', | |
component: HeroListComponent, | |
canActivate: [CanActivateGuard], | |
data: { | |
permissions: ['HERO_READ'] | |
} | |
} | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment