Note that there are some explanatory texts on larger screens.

plurals
  1. POAngularJS - item data in ng-repeat is not showing, but ng-repeat is repeating blank divs
    text
    copied!<p>This is my controller:</p> <pre><code>'use strict'; /* Controllers */ function roles($scope, $http) { delete $http.defaults.headers.common['X-Requested-With'] $http.get('/engine/ListRoles').success(function(data) { $scope.roles = data; }); $scope.orderProp = 'id'; } </code></pre> <p>This is the JSON response that I get from <code>/engine/ListRoles/</code></p> <pre><code>data: "[{"External":false,"Filter":"","ID":25,"Name":"content editor","Permissions":[{"Description":"test","Group":"report","ID":2,"Name":"view"},{"Description":"test","Group":"report","ID":4,"Name":"delete"},{"Description":"test","Group":"report","ID":3,"Name":"edit"},{"Description":"test","Group":"report","ID":5,"Name":"customize"},{"Description":"test","Group":"manage","ID":1,"Name":"access"}]},{"External":false,"Filter":"","ID":26,"Name":"data editor","Permissions":[{"Description":"test","Group":"manage","ID":1,"Name":"access"},{"Description":"test","Group":"manage","ID":6,"Name":"cache"},{"Description":"test","Group":"report","ID":5,"Name":"customize"},{"Description":"test","Group":"report","ID":4,"Name":"delete"},{"Description":"test","Group":"report","ID":3,"Name":"edit"},{"Description":"test","Group":"report","ID":2,"Name":"view"}]},{"External":false,"Filter":"","ID":27,"Name":"guest","Permissions":[]},{"External":false,"Filter":"","ID":2,"Name":"super user","Permissions":[{"Description":"test","Group":"manage","ID":1,"Name":"access"},{"Description":"test","Group":"report","ID":2,"Name":"view"},{"Description":"test","Group":"report","ID":3,"Name":"edit"},{"Description":"test","Group":"report","ID":4,"Name":"delete"},{"Description":"test","Group":"manage","ID":6,"Name":"cache"},{"Description":"test","Group":"report","ID":5,"Name":"customize"}]},{"External":false,"Filter":"","ID":1,"Name":"user","Permissions":[{"Description":"test","Group":"report","ID":2,"Name":"view"},{"Description":"test","Group":"report","ID":5,"Name":"customize"}]}]" resultcode: "200" resulttext: "" timestamp: "/Date(1369497355200+0300)/" </code></pre> <p>However when I try to use this ng-repeat:</p> <pre><code>&lt;div id="table" ng-controller="roles"&gt; &lt;div&gt; &lt;div ng-repeat="role in roles.data"&gt; {{role.Name}}&lt;br /&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>I just get a huge list of blank DIVs.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload