Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

menus state #5390

Closed
denkomanceski opened this issue Feb 10, 2016 · 1 comment
Closed

menus state #5390

denkomanceski opened this issue Feb 10, 2016 · 1 comment
Assignees
Milestone

Comments

@denkomanceski
Copy link

Is there a way to check if a menu is opened or closed ? In the documentation i can see all the functions like toogle or swipeEnable but how can i check if the menu is actually opened or not.

I am on Ionic 2

Thanks

@brandyscarney
Copy link
Member

Yes you can get this by using the following:

import {MenuController} from 'ionic/ionic';
constructor(menu: MenuController) {
  this.menu = menu;
  let menuOpen = this.menu.get().isOpen;
  console.log( menuOpen );
}

We need to simplify this so you can check if the menu is open without calling get() so I am going to leave this issue open as an enhancement.

Created a new issue for updating the docs: ionic-team/ionic-site#413

@adamdbradley adamdbradley modified the milestone: 2.0.0-beta.1 Feb 10, 2016
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants