Answer the question
In order to leave comments, you need to log in
How to implement AngularJS filtering on an array for a single parameter?
Everyone will accept, I just started to get acquainted with AngularJS, if anything, do not scold =)
The essence of the question is to organize filtering of documents by an array with categories.
There is an array with documents, each document has its own categories.
[{"id":"1","name":"test 1","categories":[139,174]},
{"id":"2","name":"test 2","categories":[132,174]},
{"id":"3","name":"test 3","categories":[149,174]},
{"id":"4","name":"test 4","categories":[139,171]},
{"id":"5","name":"test 5","categories":[94,174]}]
{"0":{"id":139},{"id":132}, "1":{"id":149}}
Answer the question
In order to leave comments, you need to log in
Use the ngRepeat directive with the filter https://docs.angularjs.org/api/ng/directive/ngRepeat (there is an example with a filter at the end).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question