Handling multiple filters in angularjs -


i using ng-repeat render complex set of data in ui. after receiving data, need filter data based on checkboxes, sliders etc. right have 6 custom filters, based on time, price, , checkboxes. using them following

ng:repeat="response in searchresponse|filter:filter1(response)|filter:filter2(response)|filter:filter3(response)|filter:filter4(response)|filter:filter5(response)|filter:filter6(response)|limitto:totaldisplayed 

this works fine think expensive way of applying filters. have noticed considerable lag in performance in rendering after this. there better way handle filters here ? considering fact may have more such filters in future.

please suggest. !

instead of chaining filters, why not like:

ng:repeat="response in searchresponse|filter:genericfilter(response, filterconditions)|limitto:totaldisplayed 

what you're doing chaining filters 1 after another, , may not needed – 1 filter selects out results based on filterconditions


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -