fix(router): ion-nav

This commit is contained in:
Manu Mtz.-Almeida
2018-03-27 12:05:22 +02:00
parent 00fc460c4e
commit 113af9e53b
5 changed files with 90 additions and 43 deletions

View File

@ -197,9 +197,8 @@ export class NavControllerBase implements NavOutlet {
}
@Method()
setRouteId(id: string, params: any = {}, direction: number): Promise<RouteWrite> {
setRouteId(id: string, params: any, direction: number): Promise<RouteWrite> {
const active = this.getActive();
if (active && active.matches(id, params)) {
return Promise.resolve({changed: false, element: active.element});
}
@ -211,12 +210,12 @@ export class NavControllerBase implements NavOutlet {
let finish: Promise<boolean>;
const commonOpts: NavOptions = {
updateURL: false,
viewIsReady: () => {
viewIsReady: (enteringEl) => {
let mark: Function;
const p = new Promise(r => mark = r);
resolve({
changed: true,
element: this.getActive().element,
element: enteringEl,
markVisible: async () => {
mark();
await finish;