Here is the code which is not working: Demo: http://jsfiddle.net/8dt94/63/
<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'];
});
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…