-1

Plunker: http://plnkr.co/edit/Sjfb3Esx1NsjwaYGLMGZ?p=preview

Accordion is in the servers tab.

The plunker actually works. My real app does not. The only thing that plunker is not really replicating is the ui-router stuff. On my actual app the accordion won't open. Other questions on SO say that ui.bootstrap is not included and that fixed their problem. I do have ui.bootstrap included though.

I've also tried copying and pasting the example from http://angular-ui.github.io/bootstrap/ that doesn't work either.

I'm at a loss for what else to look for.

More info:

I'm not getting any errors. Also other ui-bootstrap directives work just fine. I'm using tabs on this same page, and modal and dropdown work on other pages.

Justin Boyson
  • 189
  • 2
  • 16
  • What versions of bootstrap and angular-ui are you using in your app? – Manny D Feb 04 '14 at 15:49
  • ui is 0.4.0, ui-bootstrap is 0.10.0, bootstrap.css (sass) is 3.0.3.0 – Justin Boyson Feb 04 '14 at 15:57
  • It's my template. Somehow my template files are out of sync with the js files. In the template it is calling `ng-click="toggleOpen()"` which does not exist in my code. When I roll that back to `ng-click="isOpen = !isOpen"` everything works as expected. I need to figure out why my templates and js files are out of sync. – Justin Boyson Feb 04 '14 at 17:57

2 Answers2

0

there is an issue with some version of angular-ui, the js assumes that one atleast one accordion is open and tries to calculate width. But bootstrap hides all accordions. So try displaying one accordion through css, i.e. set the display property of the accordion.

0

As per my comment:

It's my template. Somehow my template files are out of sync with the js files. In the template it is calling ng-click="toggleOpen()" which does not exist in my code. When I roll that back to ng-click="isOpen = !isOpen" everything works as expected. I need to figure out why my templates and js files are out of sync.

I installed ui-bootstrap using bower which does not include template files. I need to disable template caching during development so I can't use the tpls code. I downloaded the template directory from github and some of the templates simply do not match up with the version of code that bower downloads. I updated the template file to an older version that correctly matches the code from bower. Everything works now.

Justin Boyson
  • 189
  • 2
  • 16