Setup: angularjs v1.2.3, ui-bootstrap tpl 0.4.0
Problem: Directive "popover" from UI Bootstrap inside Custom directive "milestone". Milestone directive gets rendered including the popover tag, but popover logic does not work - showing and hiding the popover. Tried to compile the popover HTML before handing over to scope variable milestonesHTML but didn't work. Any ideas?
Code: (very minimalistic to reduce complexity)
//Controller Variable
$scope.milestonesHTML;
//Usage in HTML
<milestone>
</milestone>
//Directive definition
directive('milestone', function( $compile ) {
return {
restrict: 'E',
template: '<span class="test" ng-bind-html="milestonesHTML"></span>',
link: function(scope, iElement, iAttrs) {
var milesHtml = '<img popover="End-to-end support" width="20" height="20" src="./img/info.png"/>';
var compiledMilesHtml = $compile(milesHtml)(scope);
scope.milestonesHTML = compiledMilesHtml[0].outerHTML;
}
};
Plunkr
I have made a Plunkr for that, see here