I am attempting to add dom element to the page after returning from an ajax request. The dom element contains ui-select directives, and I am getting this error:
Error: error:orphan
Orphan ngTransclude Directive
I am adding the content to the page like this:
var childDiv = $compile('<div>_contents_</div>')($scope);
parentDiv.append(childDiv);
where -contents- contains the ui-select directives below:
<p>Selected: {{address.selected.formatted_address}}</p>
<ui-select ng-model="address.selected"
theme="bootstrap"
ng-disabled="disabled"
reset-search-input="false"
>
<ui-select-match placeholder="Enter an address...">
{{$select.selected.formatted_address}}
</ui-select-match>
<ui-select-choices repeat="address in addresses track by $index"
refresh="refreshAddresses($select.search)"
refresh-delay="0">
<div ng-bind-html="address.formatted_address | highlight: $select.search"></div>
</ui-select-choices>
</ui-select>
Any ideas on how better to accomplish this?