docs(API): 翻译完了所有路由守卫

This commit is contained in:
Zhicheng Wang 2018-09-04 14:04:10 +08:00
parent 06368682ef
commit 0d7988992b
2 changed files with 21 additions and 1 deletions

View File

@ -57,7 +57,7 @@
[x] | core/Output | 0.33 [x] | core/Output | 0.33
[x] | common/http/HttpInterceptor | 0.30 [x] | common/http/HttpInterceptor | 0.30
[x] | common/http/HttpRequest | 0.29 [x] | common/http/HttpRequest | 0.29
[ ] | router/CanActivate | 0.27 [x] | router/CanActivate | 0.27
[ ] | router | 0.26 [ ] | router | 0.26
[ ] | animations/style | 0.25 [ ] | animations/style | 0.25
[ ] | common/SlicePipe | 0.25 [ ] | common/SlicePipe | 0.25

View File

@ -17,6 +17,8 @@ import {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';
* *
* Interface that a class can implement to be a guard deciding if a route can be activated. * Interface that a class can implement to be a guard deciding if a route can be activated.
* *
*
*
* ``` * ```
* class UserToken {} * class UserToken {}
* class Permissions { * class Permissions {
@ -54,6 +56,8 @@ import {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';
* *
* You can alternatively provide a function with the `canActivate` signature: * You can alternatively provide a function with the `canActivate` signature:
* *
* `canActivate`
*
* ``` * ```
* @NgModule({ * @NgModule({
* imports: [ * imports: [
@ -87,6 +91,8 @@ export interface CanActivate {
* *
* Interface that a class can implement to be a guard deciding if a child route can be activated. * Interface that a class can implement to be a guard deciding if a child route can be activated.
* *
*
*
* ``` * ```
* class UserToken {} * class UserToken {}
* class Permissions { * class Permissions {
@ -129,6 +135,8 @@ export interface CanActivate {
* *
* You can alternatively provide a function with the `canActivateChild` signature: * You can alternatively provide a function with the `canActivateChild` signature:
* *
* `canActivateChild`
*
* ``` * ```
* @NgModule({ * @NgModule({
* imports: [ * imports: [
@ -167,6 +175,8 @@ export interface CanActivateChild {
* *
* Interface that a class can implement to be a guard deciding if a route can be deactivated. * Interface that a class can implement to be a guard deciding if a route can be deactivated.
* *
*
*
* ``` * ```
* class UserToken {} * class UserToken {}
* class Permissions { * class Permissions {
@ -206,6 +216,8 @@ export interface CanActivateChild {
* *
* You can alternatively provide a function with the `canDeactivate` signature: * You can alternatively provide a function with the `canDeactivate` signature:
* *
* `canDeactivate`
*
* ``` * ```
* @NgModule({ * @NgModule({
* imports: [ * imports: [
@ -241,6 +253,8 @@ export interface CanDeactivate<T> {
* *
* Interface that class can implement to be a data provider. * Interface that class can implement to be a data provider.
* *
*
*
* ``` * ```
* class Backend { * class Backend {
* fetchTeam(id: string) { * fetchTeam(id: string) {
@ -279,6 +293,8 @@ export interface CanDeactivate<T> {
* *
* You can alternatively provide a function with the `resolve` signature: * You can alternatively provide a function with the `resolve` signature:
* *
* `resolve`
*
* ``` * ```
* @NgModule({ * @NgModule({
* imports: [ * imports: [
@ -313,6 +329,8 @@ export interface Resolve<T> {
* *
* Interface that a class can implement to be a guard deciding if a children can be loaded. * Interface that a class can implement to be a guard deciding if a children can be loaded.
* *
*
*
* ``` * ```
* class UserToken {} * class UserToken {}
* class Permissions { * class Permissions {
@ -348,6 +366,8 @@ export interface Resolve<T> {
* *
* You can alternatively provide a function with the `canLoad` signature: * You can alternatively provide a function with the `canLoad` signature:
* *
* `canLoad`
*
* ``` * ```
* @NgModule({ * @NgModule({
* imports: [ * imports: [