编辑下面的代码:【加编码】
<html> <body> <div ng-app="" ng-controller="namesController"> <p>输入过滤:</p> <p><input type="text" ng-model="name"></p> <ul> <li ng-repeat="x in names | filter:name | orderBy:'country'"> {{ (x.name | uppercase) + ', ' + x.country }} </li> </ul> </div> <script src="/demo/namesController.js"></script> <script src="https://libs.baidu.com/angular.js/1.2.5/angular.min.js"></script> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂