Answer the question
In order to leave comments, you need to log in
How to make multiple filters in Angular?
There was a need to make multiple data filtering in Angular. Tried several different ways, but almost all had their drawbacks. In particular: filtering by one value is mainly offered, but I have a lot of them.
There are objects with the following structure:
[
{
"id": 1,
"name": "Артист",
"state": "Не женат",
"price": 50000,
"bio": "Офигенный артист",
"genre": {
"id": 1,
"name": "Тамада"
},
"country": {
"id": 1,
"name": "Россия"
},
"type": {
"id": 1,
"name": "Тип1"
}
}
]
{
"id": 1,
"name": "Тип1"
}
<section class="artist-item" ng-repeat='artist in Filters = (artists | filter:typeFilters | filter:searchText)'></section>
Answer the question
In order to leave comments, you need to log in
or saw the solution
And well, throw the whole code, it seems to me that you are not calling the filters correctly on the presentation.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question