import { Injectable } from '@angular/core';
      import { ActivatedRouteSnapshot, CanActivateChild, RouterStateSnapshot } from '@angular/router';
      
      @Injectable({providedIn: 'root'})
      export class NameGuard implements CanActivateChild {
        constructor() { }
      
        canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
          return true;
        }
      }

      Typescript language logoAngular CanActivateChild Guard

      Angular snippets for TypeScript

      Shortcut: a_guard_can_activate_child

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.