I'm creating a bootstrap popover in javascript on an element, and I need to do some work after the popover DOM has been written. I have the following so far.
// bootstrap popover
element.popover({
title: scope.title,
content: content.data,
placement: "bottom",
html: true
}).on("show.bs.popover", function () {
console.log("this is still before the node is in the DOM");
});
So i'm setting title, html content, and placement. However, the html content contains an angular <directive>
that I wish to $compile()
and bootstrap doesn't add the node to the DOM until after the click event.
What I want to do, is when the node appears on the page, run a function that processes the html inside the popover.
Any ideas? Many Thanks