Nested ng-repeat in Meteor-Angular


#1

I have a collection with entries like this, which each entry corresponding to one user:
{ “_id” : “zWTJB74eA4JtGj4uc”, “user” : “abc”, “requests” : [ “carrot”, “mee” ] }

And in the front end I want to list all the requests for each user. My angular code is:

<p ng-repeat = "user in $ctrl.users">
	<p ng-repeat= "request in user.requests">{{request}}</p>
</p>

But for some reason the inner ng-repeat is not printing out anything. If I manually specify

{{user.requests[0]}}
{{user.requests[1]}}

I can still see ‘carrot’ and ‘mee’ being printed out for the ‘abc’ user. Any inputs? Thanks!


#2

I fixed the problem. Changing from <p> tag to <div> tag did the trick