4

I've got an Angular app with a search bar at the top of a webpage. This search bar is a filter that displays subsets of a JSON data array. I'd like for this filter to display its results in a fashion that doesn't affect the DOM on the rest of the page (that way, if the filter returns a ton of results, a drop down box with its own scrolling option will appear, as opposed to the results pushing down the underlying HTML page).

The solution I came up with was to wrap my ng-repeat and filter in a div and give that div an absolute position in my CSS. Is there a better way to do this? This seems awfully hackish and not very Angular to me, but I can't find any other drop down filter solutions.

1
  • Are you looking for something like a typeahead? Commented Jun 25, 2013 at 5:42

1 Answer 1

5

There is a working implementation in AngularStrap :

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.