ui-select2
ui-select2 copied to clipboard
fix updating valid and dirty statuses
The array of functions in controller.$parser is executed before validation.
That means the controller.$valid is incorrect.
controller.$valid is still the old value when the function is executed.
controller.$viewChangeListeners should be used instead of controller.$parser.
That is because controller.$viewChangeListeners is executed after validation.