docs(API): 翻译完了所有路由守卫
This commit is contained in:
parent
06368682ef
commit
0d7988992b
@ -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
|
||||||
|
@ -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: [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user