• Overview
@angular/router

mapToCanDeactivate

function

Maps an array of injectable classes with canDeactivate functions to an array of equivalent CanDeactivateFn for use in a Route definition.

  
    function mapToCanDeactivate<T = unknown>(  providers: Type<CanDeactivate<T>>[]): CanDeactivateFn<T>[];
  
  

mapToCanDeactivate

Maps an array of injectable classes with canDeactivate functions to an array of equivalent CanDeactivateFn for use in a Route definition.

Usage {@example router/utils/functional_guards.ts region='CanActivate'}

@paramprovidersType<CanDeactivate<T>>[]
@returnsCanDeactivateFn<T>[]
Jump to details