( UPDATE: The user-selected answer to this question has since been updated by an appendix that includes the current and correct way to accomplish this.)
So, sorry for the necropolis, but I looked at it today and thought that the chosen solution seemed strange, and hit my head on it for several hours. Although the solution you select could be true at some point, at the moment it is not necessary to refer to the scope property, which refers to the DOM object. All you have to do is pass the selector (I tried the identifier - other selectors may be sketchy), but wrap it with single quotes inside your double quotes in the attribute. So:
<input uib-typeahead="val for val in vals" typeahead-append-to="#myTargetElement" />
won't work but
<input uib-typeahead="val for val in vals" typeahead-append-to="'#myTargetElement'" />
will work. Note the extra single quotes: " ' #myTargetElement ' ".
source share