docs(router): fix guards API docs (#14528)

This commit is contained in:
Victor Berchet 2017-02-16 10:26:53 -08:00 committed by Igor Minar
parent 612f120208
commit 57461e9ed7
1 changed files with 10 additions and 11 deletions

View File

@ -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. * activated.
* *
* @howToUse * @howToUse
@ -53,7 +53,7 @@ import {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';
* class AppModule {} * 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({ * @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. * activated.
* *
* @howToUse * @howToUse
@ -129,7 +129,7 @@ export interface CanActivate {
* class AppModule {} * 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({ * @NgModule({
@ -159,14 +159,13 @@ export interface CanActivate {
* *
* @stable * @stable
*/ */
export interface CanActivateChild { export interface CanActivateChild {
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot):
Observable<boolean>|Promise<boolean>|boolean; 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. * deactivated.
* *
* @howToUse * @howToUse
@ -208,7 +207,7 @@ export interface CanActivateChild {
* class AppModule {} * 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({ * @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 * @howToUse
* *
@ -281,7 +280,7 @@ export interface CanDeactivate<T> {
* class AppModule {} * 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({ * @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. * loaded.
* *
* @howToUse * @howToUse
@ -353,7 +352,7 @@ export interface Resolve<T> {
* class AppModule {} * 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({ * @NgModule({