docs(router): fix guards API docs (#14528)
This commit is contained in:
parent
612f120208
commit
57461e9ed7
|
@ -13,7 +13,7 @@ import {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';
|
|||
|
||||
|
||||
/**
|
||||
* @whatItDoes Indicates that a class can implement to be a guard deciding if a route can be
|
||||
* @whatItDoes Interface that a class can implement to be a guard deciding if a route can be
|
||||
* activated.
|
||||
*
|
||||
* @howToUse
|
||||
|
@ -53,7 +53,7 @@ import {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';
|
|||
* class AppModule {}
|
||||
* ```
|
||||
*
|
||||
* You can also provide a function with the same signature instead of the class:
|
||||
* You can alternatively provide a function with the `canActivate` signature:
|
||||
*
|
||||
* ```
|
||||
* @NgModule({
|
||||
|
@ -84,7 +84,7 @@ export interface CanActivate {
|
|||
}
|
||||
|
||||
/**
|
||||
* @whatItDoes Indicates that a class can implement to be a guard deciding if a child route can be
|
||||
* @whatItDoes Interface that a class can implement to be a guard deciding if a child route can be
|
||||
* activated.
|
||||
*
|
||||
* @howToUse
|
||||
|
@ -129,7 +129,7 @@ export interface CanActivate {
|
|||
* class AppModule {}
|
||||
* ```
|
||||
*
|
||||
* You can also provide a function with the same signature instead of the class:
|
||||
* You can alternatively provide a function with the `canActivateChild` signature:
|
||||
*
|
||||
* ```
|
||||
* @NgModule({
|
||||
|
@ -159,14 +159,13 @@ export interface CanActivate {
|
|||
*
|
||||
* @stable
|
||||
*/
|
||||
|
||||
export interface CanActivateChild {
|
||||
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot):
|
||||
Observable<boolean>|Promise<boolean>|boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @whatItDoes Indicates that a class can implement to be a guard deciding if a route can be
|
||||
* @whatItDoes Interface that a class can implement to be a guard deciding if a route can be
|
||||
* deactivated.
|
||||
*
|
||||
* @howToUse
|
||||
|
@ -208,7 +207,7 @@ export interface CanActivateChild {
|
|||
* class AppModule {}
|
||||
* ```
|
||||
*
|
||||
* You can also provide a function with the same signature instead of the class:
|
||||
* You can alternatively provide a function with the `canDeactivate` signature:
|
||||
*
|
||||
* ```
|
||||
* @NgModule({
|
||||
|
@ -241,7 +240,7 @@ export interface CanDeactivate<T> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @whatItDoes Indicates that class can implement to be a data provider.
|
||||
* @whatItDoes Interface that class can implement to be a data provider.
|
||||
*
|
||||
* @howToUse
|
||||
*
|
||||
|
@ -281,7 +280,7 @@ export interface CanDeactivate<T> {
|
|||
* class AppModule {}
|
||||
* ```
|
||||
*
|
||||
* You can also provide a function with the same signature instead of the class.
|
||||
* You can alternatively provide a function with the `resolve` signature:
|
||||
*
|
||||
* ```
|
||||
* @NgModule({
|
||||
|
@ -313,7 +312,7 @@ export interface Resolve<T> {
|
|||
|
||||
|
||||
/**
|
||||
* @whatItDoes Indicates that a class can implement to be a guard deciding if a children can be
|
||||
* @whatItDoes Interface that a class can implement to be a guard deciding if a children can be
|
||||
* loaded.
|
||||
*
|
||||
* @howToUse
|
||||
|
@ -353,7 +352,7 @@ export interface Resolve<T> {
|
|||
* class AppModule {}
|
||||
* ```
|
||||
*
|
||||
* You can also provide a function with the same signature instead of the class:
|
||||
* You can alternatively provide a function with the `canLoad` signature:
|
||||
*
|
||||
* ```
|
||||
* @NgModule({
|
||||
|
|
Loading…
Reference in New Issue