search

Home  >  Q&A  >  body text

angular.js - Binding click to the checkbox's parent label in angular causes the event to be executed twice?

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

迷茫迷茫2858 days ago656

reply all(1)I'll reply

  • phpcn_u1582

    phpcn_u15822017-05-15 16:51:48

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

    reply
    0
  • Cancelreply