unionups / ember-cli-bootstrap-sass

Include bootstrap-sass and bootstrap-for-ember into an ember-cli app
19 stars 12 forks source link

bootstrap collapse with ember-cli version 2 #16

Closed iamalex2 closed 9 years ago

iamalex2 commented 9 years ago

I added this to my brocfile.js: 'ember-cli-bootstrap-sass': { 'js': ['affix','collapse'] }

how do I actually call it out in the .hbs file using this:

Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.
```
```

can someone help, trying to learn and need a portion to collapse

iamalex2 commented 9 years ago

I am trying to get Bootstrap "collapse.js" to work with a button click. It will hide but not show on button click. This is in the brocfile.js:

var app = new EmberApp({ 'ember-cli-bootstrap-sass': { 'importBootstrapJS': ['affix','collapse'] } }); and this is what I have in the template.hbs:

<a class="btn btn-primary" data-toggle="collapse" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
  Link with href
</a>
<button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
  Button with data-target
</button>
<div class="collapse" id="collapseExample">
  <div class="well">
   Some text here. Some text here. Some text here.
  </div>
</div>

Can someone help? Am I missing something. I am using ember-cli version 2.5 and ember-cli-bootstrap-sass. I need it to show when the button is clicked on. Any help would be appreciated.

iamalex2 commented 9 years ago

solved