<! DOCTYPE html>
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<meta http-equiv= "x-ua-compatible" content= "Ie=edge"/>
<meta name= "viewport" content= "width=device-width,initial-scale=1"/>
<title></title>
<meta charset= "Utf-8"/>
<link rel= "stylesheet" href= "Bootstrap-3.3.6-dist/css/bootstrap.min.css"/>
<body>
<div class= "Container" style= "padding:50px" >
<div data-ng-app= "myApp" data-ng-controller= "Myctrl" >
<ul>
<li data-ng-repeat= "x in Names" >{{x.liaohao+ "" +x.xinghao}}</li>
</ul>
</div>
</div>
Json.json
<script src= "Jquery/jquery-2.1.4.min.js" ></SCRIPT>
<script src= "bootstrap-3.3.6-dist/js/ Bootstrap.min.js "></SCRIPT>
<script src=" http://apps.bdimg.com/libs/angular.js/1.4.6/ Angular.min.js "></SCRIPT>
<script>
Angular.module (" myApp ", []). Controller (" Myctrl ", function ($scope, $http) {$http. Get ("Json/json.json"). Success (function (response) {$scope. Names=response.records})}
</script>
</body>
{
"Records": [
{
"Liaohao": "03020001",
"Xinghao": "Fr100-2s-0.7bdrv1"
},
{
"Liaohao": "03020002",
"Xinghao": "Fr100-4t-2.2bdrv2"
},
{
"Liaohao": "03020003",
"Xinghao": "Fr100-4t-2.2bdrv3"
},
{
"Liaohao": "03020004",
"Xinghao": "Fr100-4t-2.2bdrv4"
},
{
"Liaohao": "03020005",
"Xinghao": "Fr100-4t-2.2bdrv5"
},
{
"Liaohao": "03020006",
"Xinghao": "Fr100-4t-2.2bdrv6"
},
{
"Liaohao": "03020007",
"Xinghao": "Fr100-4t-2.2bdrv7"
}
]
}
Reading a static JSON file