Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ng-bind on checkbox with ng-click happens in wrong order #4765

@supercobra

Description

@supercobra

In case of a checkbox with ng-click and ng-model like this:

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

If a user clicks on this checkbox, onCompleteTodo(todo) contains the valuebefore` the click happened.

Fiddle:

The argument is that, since the click occurred before the call to onCompleteTodo (or whatever method) the method should be presented with the current value, in this case a checkbox that has been clicked.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions