angular.js - Binding click to the checkbox's parent label in angular causes the event to be executed twice?
迷茫
迷茫 2017-05-15 16:49:48
0
1
666

This select will be executed twice

<label ng-click="select('a')">
    <input type="checkbox" ng-disabled="disable">
    <span>a</span>
</label>

This is how it is currently done

<label>
    <input type="checkbox" ng-model="a" ng-change="select('a')" ng-disabled="disable">
    <span>a</span>
</label>

This will only be executed once

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
phpcn_u1582

http://stackoverflow.com/questions/17033778/child-ng-click-not-firing

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template