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

Topbar: Bind variable to see if menu is expanded #268

Open
mdedetrich opened this issue Sep 30, 2015 · 1 comment
Open

Topbar: Bind variable to see if menu is expanded #268

mdedetrich opened this issue Sep 30, 2015 · 1 comment

Comments

@mdedetrich
Copy link

Currently topbar adds/removes a expanded class if you have expanded/closed the menu. Although this is great for really trivial cases, in more complex cases you have to write a custom directive (that uses hasClass) to detect if the menu is opened, and then bind that to a variable

There should be an option for top-bar that lets you bind a variable which represents whether or not the menu has expanded, something like this

<top-bar expanded="someScopeVariable">

Then someScopeVariable will switch between true/false whenever the menu is expanded/closed. After looking at the source, this shouldn't be too hard, it would just involve a = bind and setting the variable in places like https://github.com/pineconellc/angular-foundation/blob/master/src/topbar/topbar.js#L195-L200

@jbrowning
Copy link
Member

Happy to accept a PR for this behavior. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants