Just starting out with angular.js and I wanted to create an html list with checkboxes. My goal was to trigger a javascript function when a user checks a checkbox.
<input id='box' ng-model='" + key + "' ng-change='graphquery(\"" + key + "\")' class = 'queryNameList css-checkbox' type = 'checkbox' />
Here, I've used the ng-change
directive which captures all changes and calls the graphquery
function regardless of whether the checkbox is checked or unchecked.
Is there a way to specify a condition so that the function is only called when the checkbox is checked?