I have a series of checkboxes in my ng-repeat as such:
<tr data-ng-repeat="item in blogCategory.items track by $index">
....
<td>
<label class="toggle">
<input type="checkbox" name="checkbox-toggle" checked="checked"
ng-model="blogCategory.items[$index].publish" ng-true-value="'YES'" ng-false-value="'NO'">
<i data-swchon-text="YES" data-swchoff-text="NO"></i></label>
</td>
</tr>
I have 2 category items in my sample, the first one is a false for publish, the second is a true. They are both returning as (false)/NO on the checkbox element.
The $scope vm is BlogCategory, the property/field is publish.
How do I correctly bind the input element above?
Thanks
data-schwon-textdirective do?