Angularjs--ng-repeat
1<! DOCTYPE html>234<meta charset= "UTF-8" >5<meta name= "viewport" content= "Width=device-width, initial-scale=1, maximum-scale=1, User-scalable=no" >6<title>index</title>7<link href= "{$Think. Const. Cssurl}bootstrap.min.css "rel=" stylesheet "type=" Text/css "/>8<script src= "{$Think. Const. Js}jquery.min.js "type=" Text/javascript "></script>9<script src= "{$Think. Const. Js}bootstrap.min.js "type=" Text/javascript "></script>Ten<script src= "{$Think. Const. Js}angular.min.js "type=" Text/javascript "></script> One<link href= "{$Think. Const. Cssurl}home/index.css "rel=" stylesheet "type=" Text/css "/> A -<body ng-app= "MyApp" ng-controller= "Myctrl" > -<divclass= "Container" > theclass= "Page-header" > Front-end technical solutions -<tableclass= "Table table-bordered table-hover" > -<tr> -<th>id</th> +<th>name</th> -<th>age</th> +<th> Modify </th> A<th> Delete </th> at</tr> -<TR ng-repeat= "User in Users" > -<td>{{user.id}}</td> -<td>{{user.name}}</td> -<td>{{user.age}}</td> -<td><a href= "#" > Modify </a></td> in<td><a href= "#" > Delete </a></td> -</tr> to</table> +$Think. Const. Homeimg}/01.png "/> -</div> the</body> *<script> $Angular.module ("MyApp", []). Controller ("Myctrl",function($scope){Panax Notoginseng $scope. Users = [ -{"id": "1", "Name": "Tom", "Age": "10"}, the{"id": "2", "Name": "Jack", "Age": "20"}, +{"id": "3", "name": "Shook", "Age": "10"}, A{"id": "4", "Name": "Beta", "Age": "10"}, the{"id": "5", "Name": "Yii", "Age": "12"}, +{"id": "6", "Name": "Ci", "Age": "16"}, - ]; $ $ }); -</script> -
Angularjs--ng-repeat