I am writing the code in directive for searching (Using textbox). This is the code
+ "<input type='text'  class='form-control' ng-model='newrecord."
+ attribute.name
+ "' name='"
+ attribute.name
+ "'placeholder='Start typing patient name"
+"' typeahead='"
+"a.value as a.value for a in getpatients($viewValue) | limitTo:20:begin "
+"'/>"
This is my Controller code
 $scope.getpatients = function(queryString) {
            if (queryString == undefined || queryString.length < 0) {
                return [];
            }
            queryString = 'query={"patientName":"'+queryString+'"}';
The above code is working & I can able to search. But it is searching middle letters also. I want to search from the first letter of the word like Google. Help me.
