-
Notifications
You must be signed in to change notification settings - Fork 27.4k
ngOptions does not populate options through selectCtrl #8761
Comments
Hi, what you're describing sounds like an issue in your own code rather than angular, since angular doesn't provide a "selectCtrl", and doesn't have anything to do with populating an optionsMap. Please provide a reproduction (http://jsbin.com, http://plunkr.co) more clearly showing the issue you're having, so that we can determine if there's a bug or not. |
http://jsbin.com/buvowimipale/1/edit?html,js,output Try to change selected value in to select and view the console output |
I think selectCtrl must be used in all cases, but it use only in singleMode
Or you can supply any other solution for check if model value is from options list? |
I see what you're saying |
When ngModel isn't contains key from options it selects empty option, which may be predefined as:
but value in ngModel stay initial and not updated to undefined or something like undefined |
Prior to this fix, options added to a select by ngOptions would not cause `selectCtrl.hasOption` to return `true` Closes #8761
When i use ng-repeat I can check existense of ngModel value in selected items through selectCtrl.hasOption(value)
When i use ng-options this method is unusable because optionsMap is not populated.
The text was updated successfully, but these errors were encountered: