Hi everyone.
I am new with angular and I need your help. I am using Angular 17.
I am making a http request (Get). The user is filtering items by name. I can not change the web service. So I need the folloween: from the result from the request (returns an Array), I need to filter items by brand and reference and the result in my html needs to change according to the filter. I tried to use myArray.filter() in typescript but it does not work for me with pipe, it always returns empty.
I am showing the list of items in a html from Search component where I have just one text input to find items by name making http request, and I have like a menu where I make click and it shows a select input with brand where I select the brand and this other component (Filter), emits the data to the Search component. So I wish to use the filter component just to filter inside of a array result. I do not want to make the request again.
What could I do? if you could give an example of code with filter with more than one field, I really apreciate it because in my component filter, I wish to add more fields to filter data.
Thanks