S
S
Stepan Kormilin2015-11-08 19:57:28
Angular
Stepan Kormilin, 2015-11-08 19:57:28

Is it possible to search only one property in filter:q as results?

Good afternoon!
I do list filtering like here https://docs.angularjs.org/api/ng/directive/ngRepeat
Is it possible to search not by all object properties, but only by one? Now I'm doing filter:q as results, but then even the id of the object actually gets into the search.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stepan Kormilin, 2015-11-09
@Stepan13

As a result, it turned out like this:

<input type="text" ng-model="search.title">
<div ng-repeat="product in products | filter:search">

In this option, it filters only by name, as expected.

S
Sergey Malovichko, 2015-11-08
@mrSerg161

filter:{Field:Value}:true

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question