()
| 61 | @Event() ionRouteDidChange!: EventEmitter<RouterEventDetail>; |
| 62 | |
| 63 | async componentWillLoad() { |
| 64 | await waitUntilNavNode(); |
| 65 | |
| 66 | const canProceed = await this.runGuards(this.getSegments()); |
| 67 | if (canProceed !== true) { |
| 68 | if (typeof canProceed === 'object') { |
| 69 | const { redirect } = canProceed; |
| 70 | const path = parsePath(redirect); |
| 71 | this.setSegments(path.segments, ROUTER_INTENT_NONE, path.queryString, path.fragment); |
| 72 | const result = await this.writeNavStateRoot(path.segments, ROUTER_INTENT_NONE); |
| 73 | if (result) { |
| 74 | this.maybeScrollToFragment(); |
| 75 | } |
| 76 | } |
| 77 | return; |
| 78 | } |
| 79 | |
| 80 | const result = await this.onRoutesChanged(); |
| 81 | if (result) { |
| 82 | this.maybeScrollToFragment(); |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | componentDidLoad() { |
| 87 | window.addEventListener('ionRouteRedirectChanged', debounce(this.onRedirectChanged.bind(this), 10)); |
nothing calls this directly
no test coverage detected