diff --git a/aio/content/translations/cn/api-plan.md b/aio/content/translations/cn/api-plan.md index 1e5ff71cb2..b70734ed9b 100644 --- a/aio/content/translations/cn/api-plan.md +++ b/aio/content/translations/cn/api-plan.md @@ -33,7 +33,7 @@ [x] | core/OnInit | 0.66 [x] | common/UpperCasePipe | 0.65 [x] | common/NgStyle | 0.60 -[ ] | router/RouterOutlet | 0.59 +[x] | router/RouterOutlet | 0.59 [ ] | forms/Validators | 0.59 [ ] | common/http/HttpHeaders | 0.56 [x] | core/Pipe | 0.52 diff --git a/packages/router/src/directives/router_outlet.ts b/packages/router/src/directives/router_outlet.ts index 77d6283fc8..3556211ffc 100644 --- a/packages/router/src/directives/router_outlet.ts +++ b/packages/router/src/directives/router_outlet.ts @@ -18,6 +18,8 @@ import {PRIMARY_OUTLET} from '../shared'; * * Acts as a placeholder that Angular dynamically fills based on the current router state. * + * 一个占位符,Angular 会根据当前的路由器状态动态填充它。 + * * ``` * * @@ -27,6 +29,8 @@ import {PRIMARY_OUTLET} from '../shared'; * A router outlet will emit an activate event any time a new component is being instantiated, * and a deactivate event when it is being destroyed. * + * 每当新组件实例化之后,路由出口就会发出一个激活事件;在销毁时则发出取消激活的事件。 + * * ``` * { if (!this.activated) throw new Error('Outlet is not activated'); @@ -105,6 +111,8 @@ export class RouterOutlet implements OnDestroy, OnInit { /** * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree + * + * `RouteReuseStrategy` 的指示,把以前分离的子树重新附加回来时调用 */ attach(ref: ComponentRef, activatedRoute: ActivatedRoute) { this.activated = ref;