In my jsfiddle, I cannot pass the AngularJS binding value as a parameter to the checkbox.
In this code, I:
<input type="checkbox" ng-click="includeColour('Red')" /> Red<br/>
<input type="checkbox" ng-click="includeColour('Orange')" /> Orange<br/>
<input type="checkbox" ng-click="includeColour('Yellow')" /> Yellow<br/>
I just changed some of them as shown below:
<div ng-repeat="f in fruit">
<input type="checkbox" ng-click="includeColour('{{f.colour}}')" />{{f.colour}} <br />
</div>
But it does not work.
source
share