提示:模块除了可以加载其他依赖模块,还可以创建配置、服务、控制器、指令、测试等其他类的。
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible"content="edge" />
<meta name="viewport"content="width=device-width,initial-scale=1" />
<title></title>
<meta charset="utf-8" />
<link rel="stylesheet"href="bootstrap/css/bootstrap.min.css" />
<style>
ul li {
list-style-type:none;
}
</style>
</head>
<body>
<div class="container"style="padding:50px">
<div data-ng-app="nameApp"data-ng-controller="nameCtrl">
<p>模块Module:<input type="text"data-ng-model="nameText" placeholder="输入过滤信息....."/></p>
<ul>
<li data-ng-repeat="info in names | filter:nameText">{{$index+1}}、今年{{info.name}}已经{{info.age}}岁了、{{$first}}-{{$middle}}-{{$last}}-{{$even}}-{{$odd}}。</li>
</ul>
</div>
</div>
<script src="jQuery/jquery-2.2.0.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"></script>
<script>
angular.module("nameApp", []).controller("nameCtrl", function ($scope) { $scope.names = [{ name: "曹操", age: 60 }, { name: "孙权", age: 62 }, { name: "关羽", age: 58 }, { name: "张飞", age: 56 }, {name:"诸葛亮",age:55}]})
</script>
</body>
</html>