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
Description
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"