It help me a lot! Thanks :D

El jueves, 14 de marzo de 2013 15:08:33 UTC-5, Clint Checketts escribió:
>
> Would this suit your needs? 
> http://plnkr.co/edit/TZG3Ra7yTWcAxcimz91B?p=preview
>
> Concatenate the values in the expression?
>
> <select ng-model="color" ng-options="(c.name+' '+c.shade) for c in 
> colors"></select><br>
>
>
> On Thu, Mar 14, 2013 at 2:01 PM, Brad McAlister 
> <[email protected]<javascript:>
> > wrote:
>
>> Is it possible to concatenate 2 values in a model array and push them 
>> back into the model?
>>
>> I need to grab two values and put them together into a new one so I can 
>> use that to display them in the select box with ng-options.
>>
>> It doesn't look like ng-options lets you pull two key values and to that. 
>> I tried something like this, "c.name and c.shade for c in colors", but 
>> that doesn't work. So I thought I could grab them and put them into the new 
>> item and from there so my model stay intact since I need to be able to 
>> access otehr parts of it on select change. Here's my best attempt to do 
>> that by pushing into the model but I can't push into it this way 
>> apparently. Plunker: http://plnkr.co/edit/1eNAFWmOrrQSMrWLkp7l?p=preview
>>
>> What can I do to get two values displayed into each select option?
>>
>> Thanks!
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/angular?hl=en-US.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
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