fix(nav): make call to setPages return the promise so if it rejects it doesn't get lost

This commit is contained in:
Dan Bucholtz
2017-07-25 23:57:04 -05:00
parent 4596dbe5c0
commit de0f9d5f28

View File

@@ -114,7 +114,7 @@ export class Nav extends NavControllerBase implements AfterViewInit, RootNode, I
if (segment && (segment.component || segment.loadChildren)) {
return this._linker.initViews(segment).then(views => {
this.setPages(views, null, null);
return this.setPages(views, null, null);
});
} else if (this._root) {
// no segment match, so use the root property but don't set the url I guess
@@ -133,6 +133,7 @@ export class Nav extends NavControllerBase implements AfterViewInit, RootNode, I
get root(): any {
return this._root;
}
set root(page: any) {
this._root = page;