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

@ -211,12 +211,17 @@ export class MenuController {
}
/**
* @param {string} [menuId] Optionally get the menu by its id, or side.
* @return {boolean} Returns true if the menu is currently open, otherwise false.
* @param {string} [menuId] Optionally get the menu by its id, or side.
* @return {boolean} Returns true if the specified menu is currently open, otherwise false.
* If the menuId is not specified, it returns true if ANY menu is currenly open.
*/
isOpen(menuId?: string): boolean {
let menu = this.get(menuId);
return menu && menu.isOpen || false;
if (menuId) {
var menu = this.get(menuId);
return menu && menu.isOpen || false;
} else {
return !!this.getOpen();
}
}
/**