i'd like to be able to search through multiple properties like the product name, the product info, the product price etc by typing in an input field.
what i currently have is this:
search field:
<input type="text" ng-model="search" placeholder="Search by product name or info">
simple table with products:
<tbody>
<tr ng-repeat="prod in menuCtrl.menusProd | filter:search">
<td>{{prod.name}}</td>
<td>{{prod.info}}</td>
</tr>
</tbody>
what i'm trying to achive is to be able to search typing multiple values in the search bar, because at the moment it only searches for one in any of the fields (name or info not both).
for example if i have 2 products like:
var products = [
{ name: "pizza", info: "salami"},
{ name: "pizza", info: "cheese" }
];
how can i search giving multiple values like "pizza cheese" in the search-bar (so both name and info with space between words).
i think i found the example i need but i can't manage to replicate it in es6: http://plnkr.co/edit/scuPYt?p=preview