Skip to content

Instantly share code, notes, and snippets.

@NetanelBasal
Created October 31, 2022 08:58
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/1c745d274013277e659109bf1d4d0fbb to your computer and use it in GitHub Desktop.
Save NetanelBasal/1c745d274013277e659109bf1d4d0fbb to your computer and use it in GitHub Desktop.
const routes = [
{
path: 'somePath',
component: EditCmp,
canDeactivate: [(component: EditCmp) => !component.hasUnsavedChanges],
},
{ path: 'somePath', canActivate: [() => inject(MyDependency).canActivate()] },
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment