javascript - Is there is any work around to get result according to first letter in angucomplete angularjs directive -


i using angularjs directive angucomplete-alt in there possibility results according text first select. here fiddle clear view.

angular.module('myapp', []).filter('myfilter', function(){ return function(input, text){     return input.filter(function(item){         return item.startswith(text);     }); }; });  function myctrl($scope){ $scope.filter_text = 'a'; $scope.items = [     'abc',     'bca'  ]; } 

if person type 'de' dropdown suggesting 'andhra pradesh' instead of 'delhi' because 'andhra pradesh' starts letter 'a'. want search according first letter.

thanks


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -