Is there a way to access the open accordion band? I know there is an isOpen directive, but I'm not sure if there is a way to access the state of this, but only in html. Using (and abusing?) Two-way binding, I can set a variable to hold this state, but it will not work for nested accordions without doing something like isOpen0, isOpen1, isOpen2, etc. I can also use ng-init to βdeclareβ the new isOpen in the field of nested accordions, but that doesn't seem like a good idea.
<accordion> <accordion-group is-open="isOpen"> <accordion-heading> <div ng-class="{'myClass': isOpen}">Static Text</div> </accordion-heading> This content is straight in the template. </accordion-group> </accordion>
http://plnkr.co/edit/l5y4raei99pedNWcE225
source share