简体   繁体   English

如何在angular-bootstrap弹出窗口中显示angular指令?

[英]How do I display an angular directive within a angular-bootstrap popover?

I have an angularJS directive which I want to show as a popover using Angular Bootstrap Popover When I try it, the popover just shows the directive tag. 我有一个angularJS指令,我想使用Angular Bootstrap Popover将其显示为弹出式窗口。尝试时,弹出式窗口仅显示指令标记。 (Plunk: http://plnkr.co/edit/GCY8sMMPKKLa8jZ6GrwL?p=preview ) Any pointers are greatly appreciated!! (Plunk: http ://plnkr.co/edit/GCY8sMMPKKLa8jZ6GrwL?p=preview)任何指针都将不胜感激!

I think popover just doesn't work with HTML. 我认为popover不适用于HTML。 replacing your directive's tag with a regular div tag doesn't work either. 用常规的div标签替换指令的标签也不起作用。

You cannot have directives inside HTML attributes. HTML属性中不能包含指令。 I suggest that you create a directive that passes the popover specific attributes to your target element. 我建议您创建一个指令,该指令将特定于弹出窗口的属性传递给目标元素。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM