You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I have this directive that implements a validation using $validator. The validator successfully checks the model value upon changing, though the view value is delayed.
For an example, I have a dropdown with 3 options namely A, B, and C.
It should be valid when B or C is selected.
On initialization, the view is blank as its ngModel.
Issue comes when I select B, the view value is still "None Selected" but model value is B.
Then when I select A, the view value becomes B and the model value becomes A.
It correctly attaches the invalid state of the control, but the view value is delayed..
BTW, this is a great directive. Thanks! ;)
The text was updated successfully, but these errors were encountered:
odiwodi
changed the title
view value is not updated when using $validators
view value is not using the latest selected option when using $validators
Jul 9, 2015
I used $parser and $formatters instead of $validators, and luckily has fixed the issue.
I hope this can save someone's arse from hours of research in the future. :)
Hello! I have this directive that implements a validation using $validator. The validator successfully checks the model value upon changing, though the view value is delayed.
For an example, I have a dropdown with 3 options namely A, B, and C.
It should be valid when B or C is selected.
On initialization, the view is blank as its ngModel.
Issue comes when I select B, the view value is still "None Selected" but model value is B.
Then when I select A, the view value becomes B and the model value becomes A.
It correctly attaches the invalid state of the control, but the view value is delayed..
BTW, this is a great directive. Thanks! ;)
The text was updated successfully, but these errors were encountered: