Closed mileskingston closed 8 years ago
Something like this? https://github.com/jtrussell/angular-snap.js/blob/master/examples/partials/ex-two-snappers.html
Essentially you want to make sure the snap-id you provide to your snap-toggle
matches what's on a snap-content
. They should both be strings or resolve to strings. Does that answer your question?
Thank you for your reply. More like your ex-two-drawers, except both opening from the left. https://github.com/jtrussell/angular-snap.js/blob/master/examples/partials/ex-two-drawers.html
But looking at the example this will probably work. Is there a way to only allow one menu to be open at a time?
Not really. Have you considered using a single menu but with variable content? Sounds like that may be a more fruitful than rigging together a system of multiple drawers.
Yes that sounds a lot better to me. What would be the best way of doing this? Adding two snap-content elements in side one snap-drawer and specifying them by ID?
In essence something like:
<snap-drawer ng-switch="...">
<my-menu-one ng-switch-when="..."></my-menu-one>
<my-menu-two ng-switch-default></my-menu-two>
</snap-drawer>
You might have better options depending on what you're using for routing.
Hi,
I was wondering how to specify a button to open a certain drawer on the left.
I have two drawers and two buttons, I tried to attach an ID to the drawer and use this in the snap toggle but that doesn't seem to work.