Reputation: 882
I am trying to implement radio toggle using ember component in bootstrap.
this is how I am getting the list displayed. In bootstrap when a button is clicked "active" class is appended to its label tag.
How can i set default and toggle active classess in label. JSBIN my attempt
<script type="text/x-handlebars" data-template-name="index">
{{radiobutton-list content=radioOptions selected=selectedValue}}
</script>
<script type="text/x-handlebars" data-template-name="components/radiobutton-list">
<div class="btn-group" data-toggle="buttons">
{{#each content}}
<label {{bind-attr class = ":btn :btn-primary" }}>
{{radio-button}}{{label}}
</label>
{{/each}}
</div>
Upvotes: 0
Views: 1029
Reputation: 1007
The idea behind the solution (which I battles a long time over) is to do the following:
All that is than combined with a CSS rule hiding the input radio button and we are set !
Upvotes: 1