Angularjs Filter

Alphabet Index filter using angularjs

by nkdweb

HTML

<div ng-controller="MyCtrl">   
  <input type="text" ng-model="searchText" />
  <ul ng-repeat="strVal in arrVal|filter:searchText" >
      <li>{{strVal}}</li>
  </ul>
</div>

JavaScript

var app=angular.module('myApp', []);

app.controller('MyCtrl', function ($scope,$filter) { 
  $scope.arrVal = ['Adam Slate','Alice Brutte','Babie Geo','Banu cordelli','Cranberry','Canes John', 'David', 'Darling Hello'];  
});