Hi Sebastian,
I'm having this problem now. Did you manage to find out away of getting
this to work?
Peter
On Tuesday, 4 June 2013 08:52:49 UTC+1, Sebastian Porto wrote:
>
> Hi
>
> I have a model that looks like
>
> {
> id: 1,
> label: '...',
> imageable_type: 'A',
> imageable_id: 2
> }
>
> It is Rails polymorphic association.
>
> Then I have an array of objects like this for my select control:
>
> [{imageable_type: 'A', imageable_id: 1}, {imageable_type:
> 'A', imageable_id: 2}, {imageable_type: 'B', imageable_id: 1}]
>
> As you can see there is not a unique attribute to bind to.
>
> What I would like to do is that when a selection is made in ngSelect set
> both imageable_type and imageable_id in the bound model. Is this possible
> somehow?
>
> Also is possible to tell ngSelect which item is currently selected based
> on the initial model?
>
> Thanks,
> Sebastian
>
--
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.