When the check box is selected, a classname is added to li. When it is deselected, the classname of li is removed
I’ve been searching for a long time but haven’t found a good way to operate the dom
淡淡烟草味2017-05-15 16:55:17
Use ng-class
ng-class="{'className':value}"
When value is true, className style will be applied
为情所困2017-05-15 16:55:17
If you use class
,最好给li
一个ng-class
,<li ng-class="{true: 'clasname'}[checked == true]" ></li>
~