这里是不工作的代码:Demo:
http://jsfiddle.net/8dt94/63/
原文链接:https://www.f2er.com/angularjs/146919.html<div ng-controller="MyCtrl"> <input type="text" ng-model="searchText" /> <ul ng-repeat="strVal in arrVal|orderBy|filter:searchText" > <li>{{strVal}}</li> </ul> </div> var app=angular.module('myApp',[]); app.controller('MyCtrl',function ($scope,$filter) { $scope.arrVal = ['one','two','three','four','five','six']; });