Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(router): fix guards API docs #14528

Merged
merged 1 commit into from Feb 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 10 additions & 11 deletions modules/@angular/router/src/interfaces.ts
Expand Up @@ -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
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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({
Expand Down