1 <!DOCTYPE html> 2 <html ng-app="demoApp"> 3 <head> 4 <title></title> 5 <script src="./angular-1.0.1.min.js"></script> 6 </head> 7 <body> 8 <div ng-controller="SimpleController"> 9 Name:<br/> 10 <input type="text" ng-model="name" /><br/> 11 <ul> 12 <li ng-repeat="cust in customers | filter:name | orderBy:'name'">{{cust.name}}</li> 13 14 </ul> 15 </div> 16 <script> 17 var demoApp=angular.module("demoApp",[]); 18 var controllers={}; 19 controllers.SimpleController= function ($scope){ 20 $scope.customers=[ 21 {name:'John Smith',city:'Phoenix'}, 22 {name:'John Doe',city:'New York'}, 23 {name:'Jane Doe',city:'San Francisco'} 24 ]; 25 }; 26 demoApp.controller(controllers); 27 28 </script> 29 30 </body> 31 </html>