forgottofly forgottofly - 5 months ago 30
Javascript Question

ng-repeat not pushing data

I'm using ng-repeat directive to list a set of JSON data of the format

"id": 84,
"resource": {
"id": 3,
"name": "Resource Planning",
"description": "test"
"activity": {
"id": 6,
"name": "Activity Planning",
"description": "test"

My usage of ng-repeat is like this..

<div ng-repet="data in result">{{}} {{}}</div>

I'm able to display the name ie., "Resouce Planning" and "Activity Planning".
But I can't push the data if I'm doing like this


from the controller.
Is there any way to push the name which is inside the object. And to display/list the same using ng-repeat?


I don't really understand the question, but that's not how you build your javascript object. It should be something like:

       resource: {
       activity: {