If you use the Bootstrap Accordion sample as the basis for a UI in an Angular application using ui-router and nested views, you may get unexpected re-routing when you collapse a section.
The reason for this is that the sample uses the href attribute for collapse toggling, rather than the data-target attribute. This nuance causes ui-router to attempt to redirect your application to the href value, which will likely not be found and instead load your “otherwise” view. Simply change your hrefs to data-targets and all should be well.
Thanks to Pankaj Parkar for pointing out this simple solution here.
Filed under: ASP.Net Tagged: Accordion, AngularJS, Bootstrap, data-target, href, ui-router
