Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

ng-change for <select> is invoked before the model is updated #399

Closed
@RobertSzymacha

Description

@RobertSzymacha

I have following component template:

...
<select
    ng-change="ctrl.selectionChanged()"
    ng-model="ctrl.currentValue">
  <option value="aaa">aaa</option>
  <option value="bbb">bbb</option>
  <option value="ccc">ccc</option>
</select>
...

And the component's dart code:

...
String currentValue = "aaa";
void selectionChanged() {
  print("currentValue $currentValue");
}
...

After selecting "bbb" in the select, controller prints:

currentValue aaa

while it should print "currentValue bbb"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions