How to use angular ng-repeat with an Web api?
问题 I'm trying to build a website using front-end html and get its data from a Web-api. My Web-api returns a json format. So I was trying to use the Get request using Angular $http and ng-repeat directive. My angular controller is like this - 'use strict'; app.controller('blogsController', ['$scope','$http', function ($scope, $http) { $http.get('www.example.com/api/blog') .then(function(res){ $scope.blogs = res.data; }); }]); The html code looks like this - <body app="ng-app" > <div ng-repeat="xr