My HTML file
<div ng-controller="MyCtrl">
<input type="text" ng-model="searchText" />
<ul ng-repeat="strVal in arrVal|filter:searchText|mySort" >
<li>{{strVal}}</li>
</ul></div>
My js file
var app=angular.module('myApp', []);
app.controller('MyCtrl', function ($scope,$filter) {
$scope.arrVal = ['six','one','two','five','three','four'];
});
app.filter('mySort', function() {
return function(input) {
return input.sort();
}
});
but result is that, I don't want to output this result
five//but it is order by A-Z, I am very unhappy
four
one
six
three
two
I hope that is my Final output result, any idea
one
two
three
four
five
six
any idea how to do that ,thx you so much