Reputation: 35733
I have a bootstrap popover which works outside of an angular ng-repeat
.
<a href="#" class="tt1" data-trigger="hover" data-html="true" data-selector="" data-original-title="first tooltip" data-content="fldsfkjsdöflsj dlfödjs">Hover over me</a>
As soon as I use it inside an ng-repeat it stops working. I initialize the popover in the angular controller constructor.
$('.tt1').popover();
Upvotes: 2
Views: 6167
Reputation: 4400
You should create a popover directive.
angular.module('yourModule').directive('popover', function() {
return function(scope, elem) {
elem.popover();
}
});
Then you use it on the element:
<a href="#" class="tt1" popover data-trigger="hover" data-html="true" data-selector="" data-original-title="first tooltip" data-content="fldsfkjsdöflsj dlfödjs">Hover over me</a>
Upvotes: 16