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
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
I'm trying to write a directive which I can apply across a variety select fields and requires access to the options values that are available to the user using hasOption for check would make this much easier.
The text was updated successfully, but these errors were encountered:
Hm, that's a pickle. Since ngOptions is now a standalone directive, there would need to be an interface between ngOptions and select that adds the ngOptions generated options to the selectCtrl. I'm not sure how easy this is, based on the fact that ngOptions now encodes the options differently. If you want to give a PR a shot, though, we'll be happy to look at it.
Narretz
changed the title
ngOptions does not populate options through selectCtrl
ngOptions does not populate options through selectCtrl (hasOptions doesn't work with ngOptions)
Sep 22, 2015
Narretz
changed the title
ngOptions does not populate options through selectCtrl (hasOptions doesn't work with ngOptions)
ngOptions does not populate options through selectCtrl (hasOption doesn't work with ngOptions)
Sep 22, 2015
We can overwrite the hasOption method, same as we do with writeValue etc.
However, two issues:
the function is undocumented, so we'd need to nail down that it should work a specific way
case in point: Should hasOption work with the scope.value or with the $viewValue? if you have a parser on ngModel that modifies the currently selected value, you cannot use it with scope.value
Regression(?) of #8761
Support for
selectCtrl.hasOption
inngOptions
was added in 1.3.x (09eeb48) but was lost as part of the ngOptions/select rewrite in 1.4.0(?) (408f89d)JSBins - see console whilst changing select values.
1.3.1: http://jsbin.com/sifegicura/1/edit?html,js,output
1.4.5: http://jsbin.com/zufuzuweda/1/edit?html,js,output
I'm trying to write a directive which I can apply across a variety select fields and requires access to the options values that are available to the user using
hasOption
for check would make this much easier.The text was updated successfully, but these errors were encountered: