Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // around line 666...
- _transitionStart(...): Promise<NavResult> {
- // ...
- // around line 700...
- // create a callback that needs to run within zone
- // that will fire off the willEnter/Leave lifecycle events at the right time
- transition.beforeAddRead(this._viewsWillLifecycles.bind(this, enteringView, leavingView));
- // ...
- }
- // around line 805...
- _viewsWillLifecycles(enteringView: ViewController, leavingView: ViewController) {
- if (enteringView || leavingView) {
- this._zone.run(() => {
- // Here, the order is important. WillLeave must be called before WillEnter.
- leavingView && this._willLeave(leavingView, !enteringView);
- enteringView && this._willEnter(enteringView);
- });
- }
- }
- /**
- * Add a function which contains DOM reads, which will run
- * before the animation begins.
- */
- beforeAddRead(domReadFn: Function): Animation;
- // around line 743...
- _transitionFinish(...): NavResult {
- // ...
- // around line 753...
- if (hasCompleted) {
- // transition has completed (went from 0 to 1)
- if (enteringView) {
- enteringName = enteringView.name;
- this._didEnter(enteringView);
- }
- // ..
- }
- // ...
- }
- // around line 939...
- _didEnter(view: ViewController) {
- assert(this.isTransitioning(), 'nav controller should be transitioning');
- assert(NgZone.isInAngularZone(), 'callback should be zoned');
- try {
- view._didEnter();
- this.viewDidEnter.emit(view);
- this._app.viewDidEnter.emit(view);
- } catch (e) {
- this._errHandler && this._errHandler.handleError(e);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement