angular-selectize
angular-selectize copied to clipboard
$scope does not seem to $digest when you first select an option from the dropdown
It looks that in 3.0.1 something is broken. When you select an item for the first time from the dropdown, the $scope does not get digested, so any bindings will obviously not update. I do not seem to be able to reproduce it on a plunkr but since I updated it broke at certain places where for example I have
<selectize blah ng-model="thecontroller.themodel"></selectize>
{{thecontroller.themodel}}
the value in the curly ones will not update on the first selection but rather on any consecutive ones..
If I manually call $scope.$digest for example on the onChange callback it works...
Tried with $scope.$apply but I keep having $digest already in progress error. I finally chose to use $timeout which allow to avoid this error and works fine for me. See angular's doc.