Skip to content

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

Open
@mdedetrich

Description

@mdedetrich

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions