Skip to content

Instantly share code, notes, and snippets.

@NetanelBasal
Created October 31, 2022 09:13
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 NetanelBasal/55f8e051135ac3788cab79907decaee4 to your computer and use it in GitHub Desktop.
Save NetanelBasal/55f8e051135ac3788cab79907decaee4 to your computer and use it in GitHub Desktop.
const routes = [
{
path: 'login',
component: LoginPageComponent,
canMatch: [authGuard({ isProtected: false })],
},
{
path: 'todos',
component: TodosPageComponent,
canMatch: [authGuard()],
},
{
path: 'foo',
component: FooPageComponent,
canMatch: [authGuard({ redirectTo: ['foo', 'bar'] })],
},
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment