【发布时间】:2016-06-08 13:34:31
【问题描述】:
我在一个元素的 javascript 中创建了一个引导弹出窗口,并且在编写弹出窗口 DOM 之后我需要做一些工作。到目前为止,我有以下内容。
// 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");
});
所以我正在设置标题、html 内容和位置。但是,html 内容包含我希望 $compile() 的角度 <directive> 并且引导程序直到单击事件之后才会将节点添加到 DOM。
我想要做的是,当节点出现在页面上时,运行一个处理弹出框内的 html 的函数。
有什么想法吗?非常感谢
【问题讨论】:
标签: javascript angularjs twitter-bootstrap bootstrap-popover