First look at the effect::
The following are some of the issues addressed:
1. How to submit the selected values after the new page is selected
2. When editing the page, you can see the selected
Implementation ideas:
New when the value of these check boxes is back in the background, the data structure is as follows
In the new controller, the above interface gets the value assignment
Vm.data.font_ids = Res.data.list
Viewing the view plane
<div class= "Form-group" >
<label class= "col-sm-3 control-label" > Font:</label>
<div class = "checkbox checkbox-info col-sm-6" ng-repeat= "item in Vm.data.font_ids track by $index" >
<input id={{item.id} } type= "checkbox" ng-model= "Item.is_select" ng-true-value= "1" ng-false-value= "0" >
<label class= " Text-center "for={{item.id}}>{{item.font_name}}</label>
</div>
</div>
</div >
Explain:
The value of the ng-repeat is the value taken from the control level, and then the loop assigns the check box to the selection or not, angular has a built-in instruction Ng-true-value/ng-true-false here Item.is_select Is the front desk to add a field to determine whether the selected state, in the new time do not need this is_select this field, only need to edit the time
To be continued .....