(
node: HTMLElement | undefined,
chain: RouteChain,
direction: RouterDirection,
segments: string[],
redirectFrom: string[] | null,
index = 0,
animation?: AnimationBuilder
)
| 354 | } |
| 355 | |
| 356 | private async writeNavState( |
| 357 | node: HTMLElement | undefined, |
| 358 | chain: RouteChain, |
| 359 | direction: RouterDirection, |
| 360 | segments: string[], |
| 361 | redirectFrom: string[] | null, |
| 362 | index = 0, |
| 363 | animation?: AnimationBuilder |
| 364 | ): Promise<boolean> { |
| 365 | if (this.busy) { |
| 366 | printIonWarning('[ion-router] - Router is busy, transition was cancelled.'); |
| 367 | return false; |
| 368 | } |
| 369 | this.busy = true; |
| 370 | |
| 371 | // generate route event and emit will change |
| 372 | const routeEvent = this.routeChangeEvent(segments, redirectFrom); |
| 373 | if (routeEvent) { |
| 374 | this.ionRouteWillChange.emit(routeEvent); |
| 375 | } |
| 376 | |
| 377 | const changed = await writeNavState(node, chain, direction, index, false, animation); |
| 378 | this.busy = false; |
| 379 | |
| 380 | // emit did change |
| 381 | if (routeEvent) { |
| 382 | this.ionRouteDidChange.emit(routeEvent); |
| 383 | } |
| 384 | return changed; |
| 385 | } |
| 386 | |
| 387 | private setSegments(segments: string[], direction: RouterDirection, queryString?: string, fragment?: string) { |
| 388 | this.state++; |
no test coverage detected