<!doctype html>
<html lang="en" ng-app="myAPP">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="http://apps.bdimg.com/libs/angular.js/1.3.9/angular.min.js"></script>
</head>
<body>
<div ng-controller="studentController">
<ul>
<li ng-repeat="student in students">
<a href="/views/{{student.id}}">{{student.name}}</a>
</li>
</ul>
</div>
<script>
var students=[
{"id":"12","name":"join"},
{"id":"13","name":"join1"},
{"id":"14","name":"join2"},
{"id":"15","name":"join3"}
];
var myAPP=angular.module('myAPP',[]);
myAPP.controller('studentController',function($scope){
$scope.students=students;/views/
});
</script>
</body>
</html>
ng-repeat 在angularJS中用法
最新推荐文章于 2024-01-28 05:15:00 发布