LukaszWatroba / v-accordion

Multi-level accordion component for AngularJS.
http://lukaszwatroba.github.io/v-accordion
MIT License
310 stars 100 forks source link

Cannot read property 'expanded' of undefined #22

Closed peter00155 closed 9 years ago

peter00155 commented 9 years ago

Im trying to display this:

 <v-accordion class="vAccordion--default" multiple>

 <!-- Pane One expanded -->
  <v-pane expanded>
  <v-pane-header>
    Pane header #1
  </v-pane-header>

  <v-pane-content>
    Pane content #1
  </v-pane-content>
 </v-pane>

 <!-- Pane Two expanded too -->
   <v-pane expanded>
     <v-pane-header>
      Pane header #2
   </v-pane-header>

   <v-pane-content>
      Pane content #2
    </v-pane-content>
   </v-pane>

</v-accordion>

And this message appear: TypeError: Cannot read property 'expanded' of undefined. What can cause it?

c-dante commented 9 years ago

if you're using https://angular-ui.github.io/bootstrap/ It's a namespace collision with ui-bootstrap

accordionConfig collides with ui-bootstraps similar angular constant.

marinbgd commented 9 years ago

Aaaaaand how to fix this ? I want to use both libs.

peter00155 commented 9 years ago

Define vAccordion after ui.bootstrap in angular.module. Like this:

  var myApp = angular.module('myApp', [ 'ui.bootstrap', 'vAccordion']);
marinbgd commented 9 years ago

Thanks. It works :)