How to create down filtering results in AngularJS

I have an Angular app with a search bar at the top of a webpage. This search bar is a filter that displays subsets of the JSON dataset. I would like this filter to display its results in a way that does not affect the DOM on the rest of the page (this way, if the filter returns a ton of results, a drop-down box with its own scroll parameter will appear, unlike results that repel the main HTML page).

The solution I came across was to wrap my ng-repeat and filter it in a div and give it a div a absolute in my CSS. Is there a better way to do this? This seems terribly hacked and not very Angular to me, but I cannot find any other dropdown filters.

+4
source share

Source: https://habr.com/ru/post/1487979/


All Articles