• 개요
@angular/router

DeprecatedGuard

타입 별칭
사용 중단 권고

The InjectionToken and @Injectable classes for guards are deprecated in favor of plain JavaScript functions instead. Dependency injection can still be achieved using the inject function from @angular/core and an injectable class can be used as a functional guard using inject: canActivate: [() => inject(myGuard).canActivate()].

API

    
      type DeprecatedGuard = ProviderToken<any> | string
    
    
상세 내용으로 이동