fix(app): go back navigation can close menus

This commit is contained in:
Manu Mtz.-Almeida
2016-12-02 14:06:51 +01:00
parent 5567191a45
commit 8de253a9b1
6 changed files with 44 additions and 30 deletions

View File

@ -25,7 +25,7 @@ import { DomController } from '../util/dom-controller';
*/
export class NavControllerBase extends Ion implements NavController {
_children: any[] = [];
_children: NavController[] = [];
_ids: number = -1;
_init = false;
_isPortal: boolean;
@ -883,15 +883,15 @@ export class NavControllerBase extends Ion implements NavController {
this._app.viewWillUnload.emit(view);
}
getActiveChildNav(): any {
getActiveChildNav(): NavController {
return this._children[this._children.length - 1];
}
registerChildNav(nav: any) {
registerChildNav(nav: NavController) {
this._children.push(nav);
}
unregisterChildNav(nav: any) {
unregisterChildNav(nav: NavController) {
removeArrayItem(this._children, nav);
}

View File

@ -597,4 +597,8 @@ export abstract class NavController {
*/
abstract canGoBack(): boolean;
/**
* @private
*/
abstract registerChildNav(nav: NavController);
}