Created
          October 31, 2022 08:58 
        
      - 
      
 - 
        
Save NetanelBasal/1c745d274013277e659109bf1d4d0fbb to your computer and use it in GitHub Desktop.  
  
    
      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 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