angularjs - bootstrap Label type=checkbox not setting on scope -
using angular.
i have label type=checkbox , class=btn btn-default. have set ng-model="{{vurd.vurderinger}}" , set ng-true-value="ho" , ng-false-value="".
<label type="checkbox" class="btn btn-default" ng-model="vurd.vurderingsudfaldid" ng-true-value="'ho'" ng-false-value="''">ok</label>
it not setting $scope = vurd.vurderingsudfaldid true or false value when clicking. there bootstrap label+input type i'm not getting?
the following example working not way want button :
<input type="checkbox" ng-model="vurd.vurderingsudfaldid" ng-true-value="'bo'" ng-false-value="''" />
you still need have input type of checkbox.. not label type of checkbox. 1 of these alternatives work you?
http://plnkr.co/edit/9cbr5z6eqmbdsjigngh9?p=preview
the first option shows checkbox:
<label><input type="checkbox" class="btn btn-default" ng-model="vurd.vurderingsudfaldid" ng-true-value="'ho'" ng-false-value="''"/>ok</label>
the second option hides checkbox, still functional:
<label><input ng-hide="true" type="checkbox" class="btn btn-default" ng-model="vurd.vurderingsudfaldid" ng-true-value="'ho'" ng-false-value="''"/>ok</label>
Comments
Post a Comment