MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / success

Method success

core/src/components/nav/nav.tsx:562–586  ·  view source on GitHub ↗
(result: NavResult, ti: TransitionInstruction)

Source from the content-addressed store, hash-verified

560 }
561
562 private success(result: NavResult, ti: TransitionInstruction) {
563 if (this.destroyed) {
564 this.fireError('nav controller was destroyed', ti);
565 return;
566 }
567
568 if (ti.done) {
569 ti.done(
570 result.hasCompleted,
571 result.requiresTransition,
572 result.enteringView,
573 result.leavingView,
574 result.direction
575 );
576 }
577 ti.resolve!(result.hasCompleted);
578
579 if (ti.opts!.updateURL !== false && this.useRouter) {
580 const router = document.querySelector('ion-router');
581 if (router) {
582 const direction = result.direction === 'back' ? 'back' : 'forward';
583 router.navChanged(direction);
584 }
585 }
586 }
587
588 private failed(rejectReason: any, ti: TransitionInstruction) {
589 if (this.destroyed) {

Callers 1

runTransitionMethod · 0.95

Calls 2

fireErrorMethod · 0.95
navChangedMethod · 0.80

Tested by

no test coverage detected