2016-08-08 18:48:45 -04:00
|
|
|
extends ../../../ts/_cache/guide/lifecycle-hooks.jade
|
2016-01-21 12:49:13 -05:00
|
|
|
|
2016-05-06 09:17:34 -04:00
|
|
|
block includes
|
|
|
|
include ../_util-fns
|
2016-01-21 12:49:13 -05:00
|
|
|
|
2016-08-19 18:07:30 -04:00
|
|
|
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.
|
2016-01-21 12:49:13 -05:00
|
|
|
|
2016-05-06 09:17:34 -04:00
|
|
|
block tick-methods
|
|
|
|
:marked
|
2016-08-19 18:07:30 -04:00
|
|
|
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.
|