Skip to content

Instantly share code, notes, and snippets.

@AnkitMaheshwariIn
Created December 30, 2019 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AnkitMaheshwariIn/10801b9aa42f20eff894512c978ad14a to your computer and use it in GitHub Desktop.
Save AnkitMaheshwariIn/10801b9aa42f20eff894512c978ad14a to your computer and use it in GitHub Desktop.
Register AuthGuardService
const routes: Routes = [
{
path: 'user/:id',
component: UserDetailComponent,
canActivate:[AuthGuardService]
},
{
path: 'admin',
component: AdminComponent,
canActivate: [AuthGuardService]
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment