angularjs - Listing Rails API Data in Angular -
I'm getting this exception:
expected to keep an array The response is but an object is found coz isArray: true If ill make it wrong and the exception is gone. "{{"} ": {" Id ": 1," name ":" This is the first "," description ":" this is the first "}, {" id " {"Id": 3, "name": "this is $ th topic", "description": "this is $ th theme": "This theme is $ $ theme:", "name": "second themes", "description": "second theme"}, "}]} But I do not know how to recover data from this JSN.
& lt; Tr ng- show = "themes.length" ng-repeat = "themes in topics" & gt; & Lt; TD & gt; {{theme.name}} & lt; / TD & gt; & Lt; TD & gt; {{theme.description}} & lt; / TD & gt; & Lt; / TR & gt;
Try modifying your json response like this: [{"id" "," "Description", "made_t": "2014-10-08T10: 37: 08.208Z"}, {"id": 2, "Name": "second themes", "description": "second theme", "created": "2014-10-08T11: 28: 54.900Z"}, {"id": 4, "name": "fourth Theme "," description ":" fourth theme "," created ":" 2014-10-09T05: 13: 35.605Z "}] You can do it from your rail subjects Are / index.json
object wrong child (@themes => themes) expand to "themes / show" end Modify this:
object @themes Attributes: id,: your resource
Comments
Post a Comment