Apologies if its basic for the C# developers out there. I have several <accordion>
in one sidebar and each has data-ng-click="isOpen = !isOpen"
to either expand or collapse accordion. The issue is that each of these calls a different controller. Is there a way to globally set the isOpen variable to make sure all accordions are expanded by default and the can be clicked to expand/collapse ?
Read: Passing Javascript to Razor $rootscope Accordion expand alland many others
This is a sample code for one of the sections.....there are many more though with different controllers:
<accordion>
<div class="zone zone-aside-right">
<div data-ng-controller="SelectUserController" id="account-group-widget">
<accordion-group class="sp-sidebar-module">
<div>
<accordion-heading>
<h3 class="h4 sp-sidebar-module-header">
<a id="headerRelatedContacts" href="javascript: void(0);" data-ng-click="isOpen = !isOpen"><i id="iconRelatedContacts" class="icon-refresh icon-spin"></i>@mycontact.text</a>
</h3>
</accordion-heading>
</div>
</accordion-group>
</div>
</accordion>
Appreciate suggestions...