Clicking a checkbox with ng-click does not update the model

How about changing

<input type="checkbox" ng-click='onCompleteTodo(todo)' ng-model="todo.done">

to

<input type="checkbox" ng-change="onCompleteTodo(todo)" ng-model="todo.done">

From docs:

Evaluate given expression when user changes the input. The expression is not evaluated when the value change is coming from the model.

Note, this directive requires ngModel to be present.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)