You need to do something like this: <select ng-options="item.subItem as
item.label for item in values track by item.id" ng-model="selected">

And if you take a look, *"ng:repeat"* is wrong, the correct is *"ng-repeat"*

Regards,
Samuel

On Thu, Mar 26, 2015 at 10:46 PM, Rahul Aggarwal <
[email protected]> wrote:

> Hi,
> I am trying to iterate over an object array using ng-repeat in select
> field. But the key contains special symbol like _id.So it is giving an
> error - *"Error: [$interpolate:interr]
> http://errors.angularjs.org/undefined/$interpolate/interr?p0=%7B%7Bclass%5B'_id'%5D%7D%7D&p1=Error%3A%20%5B%24parse%3Aisecprv%5D%20http%3A%2F%2Ferrors.angularjs.org%2Fundefined%2F%24parse%2Fisecprv%3Fp0%3Dclass%255B'_id'%255D
> <http://errors.angularjs.org/undefined/$interpolate/interr?p0=%7B%7Bclass%5B'_id'%5D%7D%7D&p1=Error%3A%20%5B%24parse%3Aisecprv%5D%20http%3A%2F%2Ferrors.angularjs.org%2Fundefined%2F%24parse%2Fisecprv%3Fp0%3Dclass%255B'_id'%255D>
> "* .
> The sample code is-
> <option ng:repeat="category in categories" value="{{category['_id']}}">{{
> category.name}}</option>.
>
> Kindly suggest any solution. Thanks in advance.
>
> --
> 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.
>

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