Skip to content

Instantly share code, notes, and snippets.

@brachi-wernick
Created July 18, 2018 07:15
Show Gist options
  • Save brachi-wernick/b5257eca0e5748fbb86af3e3973dd88d to your computer and use it in GitHub Desktop.
Save brachi-wernick/b5257eca0e5748fbb86af3e3973dd88d to your computer and use it in GitHub Desktop.
Route config with only one route guard
const appRoutes: Routes = [
{
path: "",
canActivateChild: [CanActivateGuard],
children: [
{
path: 'crisis-center', component: CrisisListComponent,
},
{
path: 'hero/:id',
component: HeroDetailComponent,
},
{
path: 'heroes',
component: HeroListComponent,
}
]
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment