diff --git a/aio/content/guide/cheatsheet.md b/aio/content/guide/cheatsheet.md
index 51f329ae0f..570eaae499 100644
--- a/aio/content/guide/cheatsheet.md
+++ b/aio/content/guide/cheatsheet.md
@@ -366,7 +366,7 @@ so the @Directive
configuration applies to components as well
ngOnChanges(changeRecord) { ... }
Called after every change to input properties and before processing content or child views.
-每当输入属性发生变化时就会调用,但位于处理内容(`ng-content`)或子视图之前。
+每当输入属性发生变化时就会调用,但位于处理内容(ng-content
)或子视图之前。
ngOnInit() { ... }
@Directive
configuration applies to components as well
ngAfterContentInit() { ... }
Called after ngOnInit
when the component's or directive's content has been initialized.
ngOnInit
完成之后,当组件或指令的内容(`ng-content`)已经初始化完毕时调用。
ngOnInit
完成之后,当组件或指令的内容(ng-content
)已经初始化完毕时调用。
ngAfterContentChecked() { ... }
Called after every check of the component's or directive's content.
-每当组件或指令的内容(`ng-content`)做变更检测时调用。
+每当组件或指令的内容(ng-content
)做变更检测时调用。
ngAfterViewInit() { ... }
@Directive
configuration applies to components as well
<a [routerLink]="[ '/path' ]" routerLinkActive="active">
The provided classes are added to the element when the routerLink
becomes the current active route.
当 routerLink
指向的路由变成活动路由时,为当前元素添加一些类(比如这里的 `active`)。
当 routerLink
指向的路由变成活动路由时,为当前元素添加一些类(比如这里的 active
)。
class CanActivateGuard implements CanActivate {
canActivate(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<boolean>|Promise<boolean>|boolean { ... }
}
{ path: ..., canActivate: [CanActivateGuard] }
An interface for defining a class that the router should call first to determine if it should activate this component. Should return a boolean or an Observable/Promise that resolves to a boolean.
-用来定义类的接口。路由器会首先调用本接口来决定是否激活该路由。应该返回一个 `boolean` 或能解析成 `boolean` 的 `Observable/Promise`。
+用来定义类的接口。路由器会首先调用本接口来决定是否激活该路由。应该返回一个 boolean
或能解析成 boolean
的 Observable/Promise
。
class CanDeactivateGuard implements CanDeactivate<T> {
canDeactivate(
component: T,
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<boolean>|Promise<boolean>|boolean { ... }
}
{ path: ..., canDeactivate: [CanDeactivateGuard] }
An interface for defining a class that the router should call first to determine if it should deactivate this component after a navigation. Should return a boolean or an Observable/Promise that resolves to a boolean.
-用来定义类的接口。路由器会在导航离开前首先调用本接口以决定是否取消激活本路由。应该返回一个 `boolean` 或能解析成 `boolean` 的 `Observable/Promise`。
+用来定义类的接口。路由器会在导航离开前首先调用本接口以决定是否取消激活本路由。应该返回一个 boolean
或能解析成 boolean
的 Observable/Promise
。
class CanActivateChildGuard implements CanActivateChild {
canActivateChild(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<boolean>|Promise<boolean>|boolean { ... }
}
{ path: ..., canActivateChild: [CanActivateGuard],
children: ... }
An interface for defining a class that the router should call first to determine if it should activate the child route. Should return a boolean or an Observable/Promise that resolves to a boolean.
-用来定义类的接口。路由器会首先调用本接口来决定是否激活一个子路由。应该返回一个 `boolean` 或能解析成 `boolean` 的 `Observable/Promise`。
+用来定义类的接口。路由器会首先调用本接口来决定是否激活一个子路由。应该返回一个 boolean
或能解析成 boolean
的 Observable/Promise
。
class ResolveGuard implements Resolve<T> {
resolve(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<any>|Promise<any>|any { ... }
}
{ path: ..., resolve: [ResolveGuard] }
An interface for defining a class that the router should call first to resolve route data before rendering the route. Should return a value or an Observable/Promise that resolves to a value.
-用来定义类的接口。路由器会在渲染该路由之前,首先调用它来解析路由数据。应该返回一个值或能解析成值的 `Observable/Promise`。
+用来定义类的接口。路由器会在渲染该路由之前,首先调用它来解析路由数据。应该返回一个值或能解析成值的 Observable/Promise
。
class CanLoadGuard implements CanLoad {
canLoad(
route: Route
): Observable<boolean>|Promise<boolean>|boolean { ... }
}
{ path: ..., canLoad: [CanLoadGuard], loadChildren: ... }
An interface for defining a class that the router should call first to check if the lazy loaded module should be loaded. Should return a boolean or an Observable/Promise that resolves to a boolean.
-用来定义类的接口。路由器会首先调用它来决定是否应该加载一个惰性加载模块。应该返回一个 `boolean` 或能解析成 `boolean` 的 `Observable/Promise`。
+用来定义类的接口。路由器会首先调用它来决定是否应该加载一个惰性加载模块。应该返回一个 boolean
或能解析成 boolean
的 Observable/Promise
。