有没有机会我可以将一个bs-popover
元素编译成div
我在代码中用 angularjs 创建的元素,然后将它添加到 DOM 以便我的弹出框工作?
menu.setAttribute('bs-popover',null);
所以基本上我希望bs-popover
将其编译到以这种方式创建的菜单元素中
const menu = document.createElement('div');
menu.className += 'layout-row layout-align-center-center containerTrigger';
menu.setAttribute("id", "openMenuTrigger");
menu.setAttribute("data-content", "null");
menu.setAttribute("data-template-url", "app/main/rgc/project/components/project-details/general-info/status-menu.html");
menu.setAttribute("data-animation", "am-flip-x");
menu.setAttribute("data-auto-close", "1");
menu.setAttribute('bs-popover',null);
rightSideContainer.appendChild(menu);
我可以在 HTML 中添加这些属性,但事实是我的逻辑完全不同,我必须在代码中创建它。有什么想法吗?