//自己任意接口
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script src="js/angular.min.js"></script>
<script>
var app= angular.module("gaoyn",[]);
/*
* $http.get("welcome.htm").then(function (response) {
$scope.myWelcome = response.data;
});
*/
//$http:服务向服务器发送请求,应用 响应服务器传送过来的数据。
app.controller("democ",function($scope,$http){
$http.get("data/商品分类接口.json").then(function(rep){
$scope.types=rep.data.data;
})
})
</script>
</head>
<body ng-app="gaoyn" ng-controller="democ">
<table border="1px">
<tr ng-repeat="d in types">
<td>
{{d.cid}}
</td>
<td>{{d.createtime}}</td>
<td><img style="width:50px;" src={{d.icon}} alt={{d.icon}}/></td>
<td>{{d.ishome}}</td>
<td>{{d.name}}</td>
</tr>
</table>
</body>
</html>