mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 13:32:54 +08:00
fix(app): go back navigation can close menus
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
@ -597,4 +597,8 @@ export abstract class NavController {
|
||||
*/
|
||||
abstract canGoBack(): boolean;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
abstract registerChildNav(nav: NavController);
|
||||
}
|
||||
|
Reference in New Issue
Block a user