angularJs实现复选框的全选反选

1    功能介绍
1.1    业务场景
做一个批量的启用或停用功能,需要实现:
1)    复选框的全选和反选
2)    该表有四个主键,因些传递对象,并把对象的四个主键主取出来,封装成一个对象,然后把对象存进数组,把数组传递给后台方法
1.2    angularJs的全选和反选
1.2.1    实现代码

前台html:

<input type="checkbox" ng-model="master" ng-click="all($event,sapConfigures)"/>
<input type="checkbox" name="selected" ng-model="cheakSingle" ng-checked="master" ng-click="updateSelection($event,sapConfigure)"/>

 

js:

angularJs实现复选框的全选反选

angularJs实现复选框的全选反选

 

1.2.2    批量停用

html:

angularJs实现复选框的全选反选

js:

angularJs实现复选框的全选反选

后台方法:

angularJs实现复选框的全选反选