I am using AngularJS and AngularUI Bootstrap's Typeahead. I want to use the filter with multiple parameters. Here is my input control:
<input id="tbUsers" class="form-control" ng-model="unit.userSel"
typeahead="user as user._FName + '(' + user._LName +')' for user in allUsers | filter:{_FName : _LName:$viewValue}:myFunc | limitTo:8"
typeahead-editable="false" required />
In my controller I have function for myFunc:
$scope.myFunc = function (FName, LName, viewValue) {
//logic here
return true;
}
I am unable to pass multiple parameters to myFunc. If I remove the LName param from controller function and the input filter, then it works fine. If I add 2 parameters, myFunc doesn't get called.
Please help!!
P.S.: My first question here, so I might have broken a few rules, sorry about that!