Monday 15 April 2013

php - angularJS $http.get() request on a complicated JSON output -


I have a PHP that outputs as JSN code:

   

Assuming that you can put the JSON response in the data value in one variable data , it looks like you want something similar in your view: < Pre & lt; li & gt; repeat = "data group (group, user)" & gt; & lt; p & gt; group: {{group}} & lt; / P & gt; & lt; ul & gt; & lt; li ng-repeat = "User in User" & gt; {{User }} & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt; & Lt; / Ul & gt;

This sub-catalog will print a list of groups with users. Here is one for Angelal documentation on ng-repeat directive.

No comments:

Post a Comment