filter过滤器
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body ng-app="app" ng-controller="xmgController">
<!--true:降序, false:升序-->
<p>{{stu | orderBy:'age' : false}}</p>
<input type="text" ng-model="search">
<ul>
<li ng-repeat="value in course | filter:search">{{value}}</li>
</ul>
</body>
<script src="js/angular.js"></script>
<script>
//1.创建模块
var app = angular.module('app', []);
//2.创建控制器
app.controller('xmgController', ['$scope', function ($scope) {
$scope.course = ['html', 'css', 'js'];
$scope.stu = [
{name:'zs', age:18},
{name:'ls', age:22},
{name:'yj', age:11},
{name:'sk', age:33}
];
}]);
//3.绑定模块 ng-app="app"
//4.绑定控制器 ng-controller="xmgController"
</script>
</html>