Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • I've updated the plunker and still cannot display datas Commented Oct 1, 2014 at 20:40
  • I don't know why (yet), your variable called datas has some problem. When I changed to newName for example, it worked. You don't even need the $timeout. And, as Shomz stated, the JSON is malformed. Commented Oct 1, 2014 at 21:29
  • This is working: plnkr. That's really weird why the $scope.data is not working :( Commented Oct 1, 2014 at 21:36
  • Thanks a lot. Now i remember that to access the whole json response we have to use res.data and here data is not a json key as we did. See docs.angularjs.org/api/ng/service/$http Commented Oct 1, 2014 at 21:43
  • Yeah, I explained in my answer why that is. There is a child scope of that controller (coming from the controller definition in routes), and that's what the partial uses. Different variable name causes propagation to work (which it doesn't if two child/parent scope variables have the same name). Commented Oct 1, 2014 at 21:43