I'm trying to append the Angular UI Typeahead control to a custom element in my HTML. The docs state this:
typeahead-append-to $ (Default: null) - Should the typeahead popup be appended to an element instead of the parent element?
The typeahead-append-to attribute expects you to reference an element in your controller and bind to that:
$scope.appendToElement = window.document.querySelector('body'); <input uib-typeahead="val for val in vals" typeahead-append-to="appendToElement" />
The code in the typeahead directive that reads the attribute and appends the element can be seen here