I am trying to filter through multiple properties in Angular. I am able to filter through one property easily by using filter:{ title: searchString } but when I try to use multiple properties... it doesn't seem to get any result at all.
What I need to do is:
If John Wayne is passed through.. it shows John Wayne but if only John or only Wayne is passed through... It still shows John Wayne. Similarly for n w since John ends with an n and subTitle starts with a w
My Code:
<input type="text" ng-model="searchString">
<div ng-repeat="arr in arr1 | filter:{ title: searchString, subTitle: searchString }"></div>
$scope.arr1 = [
{title: 'John',subTitle:'Wayne'}
{title: 'Barry'}
];