-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Provide a way to define value property for ng-options #1833
Comments
@caiotoon: can you clarify this a bit? Do you mean that in an example like this: http://jsfiddle.net/SHwb5/1/ The options that are generated don't have If so, what's the use case? Presumably the whole point in using ng-options, rather than an internal ng-repeat is simplicity rather than power, and it doesn't matter what |
I'm thinking more of non-angular plugins that rely on the select field value. I do agree that it's simpler to not care with it, but if I need to, there is currently no way to achieve it. Of course we could change the plugin and use What you think? |
the issue is like that. for "action.id as action.name for (index,action) in actions" and this BUG because the label we write is action.id so the result should be : openCashier openCashierOffer openInviteFriends |
Sorry @perymimon, I'm not sure if I understood your point. But I don't believe we're talking about the same thing, as I'm not talking about a bug, but a feature request. |
Closed by #2040. |
ng-options
should provide a way to define which property of the object should be used asvalue
for the option.The expression
select as label for value in array
does provide a way to define which property will be associated to theng-model
, but it's not used as thevalue
property of the options elements.The text was updated successfully, but these errors were encountered: