Your ng-options needs to look like this:

ng-options="value.name as value.name for value in values"

Without "value.name as" at the front, the value assigned to the ng-model
will be value (the whole object).
If you don't use your select-object directive, the result will be the
selected name string value.


On Wed, Sep 3, 2014 at 3:09 PM, Björn Häuser <[email protected]>
wrote:

> Hey there,
>
> I am talking about this plnkr here:
> http://plnkr.co/edit/9NgV77s3Ulrnn145waS9?p=preview
>
> I want to have a select where the model differs from the selected value.
> Is this somehow possible?
>
> Thanks in advance
> Björn
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
R. Mark Volkmann
Object Computing, Inc.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to