(result: NavResult, ti: TransitionInstruction)
| 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) { |
no test coverage detected