diff --git a/ionic/components/menu/menu-controller.ts b/ionic/components/menu/menu-controller.ts index 0172fc71fb..3e79392776 100644 --- a/ionic/components/menu/menu-controller.ts +++ b/ionic/components/menu/menu-controller.ts @@ -197,7 +197,26 @@ export class MenuController { } /** - * Used to get a menu instance. + * @return {boolean} Returns true if the menu is currently open, otherwise false. + */ + isOpen(menuId?: string): boolean { + let menu = this.get(menuId); + return menu && menu.isOpen || false; + } + + /** + * @return {boolean} Returns true if the menu is currently enabled, otherwise false. + */ + isEnabled(menuId?: string): boolean { + let menu = this.get(menuId); + return menu && menu.isEnabled || false; + } + + /** + * Used to get a menu instance. If a `menuId` is not provided then it'll return + * the first menu found. If a `menuId` is provided, then it'll first try to find + * the menu using the menu's `id` attribute. If a menu is not found using the `id` + * attribute, then it'll try to find the menu by its `side` name. * @param {string} [menuId] Optionally get the menu by its id, or side. * @return {Menu} Returns the instance of the menu if found, otherwise `null`. */