angular-docs-cn/public/docs/dart/latest/guide/lifecycle-hooks.jade
Patrice Chalin f0daf5d238 docs(lifecycle-hooks): post-RC5 Dart resync (#2141)
* lifecycle-hooks: copy latest to cache

* docs(lifecycle-hooks): post-RC5 Dart resync

- TS prose: removed mention of `routerOnActivate` which no longer
exists in the new router.
- TS improvements to the sample code have also been propagated to the
Dart sample.

Contributes to #2077.
E2E tests pass now.

* post-review updates
2016-08-19 15:07:30 -07:00

19 lines
689 B
Plaintext

extends ../../../ts/_cache/guide/lifecycle-hooks.jade
block includes
include ../_util-fns
block other-angular-subsystems
:marked
The router, for instance, also has its own [router lifecycle
hooks](router.html#router-lifecycle-hooks) that allow us to tap into
specific moments in route navigation.
A parallel can be drawn between `ngOnInit` and `routerOnActivate`. Both are
prefixed so as to avoid collision, and both run right when a component is
being initialized.
block tick-methods
:marked
The `LoggerService.tick` method, which returns a `Future`, postpones the
update one turn of the of the browser's update cycle ... and that's long enough.