Search code examples
javascriptangularjstwitter-bootstrapangular-ui

Toggle radio button on Mobile angular UI


i'm tryng to put two radio button on my registration form on a Mobile Angular UI based application but i run into two problems:

-on a normal bootstrap-angular based app the selection of one radio change the visual active status but in my case no

-on chrome i've the following problem:

 target' or 'target-class' attribute required with 'toggle' 
 <div class="btn-group" data-toggle="buttons">

here is my fiddle: http://jsfiddle.net/187jab3k/

thanks for the support.


Solution

  • Try this:

    <div class="btn-group" role="group">
       <button type="button" ng-model="gender" ng-click="color = 'mr';" class="btn btn-default">MR.
       </button>
       <button type="button" ng-model="gender" ng-click="color = 'mrs';" class="btn btn-default">MRS.
       </button>
    </div>
    <label>{{gender}}</label>