简体   繁体   中英

Using Directive/Isolated scope as HTML inside a angular-bootstrap popover

Using angular-ui popover you can put an html inside a popover. If for example I have a directive named sampleDirective (assuming this directive exists) how can I put it inside the popover? I tried using $sce.trustAsHtml but it doesn't work. I also tried $compile but failed miserably.

$sce.trustAsHtml('<sample-directive></sample-directive>');

Is there a way to use to put an element directive inside a popover?

正如Alon Eitan所说,我没有使用ui-popover-html ,而是使用了ui-popover-template template,并将指令的templateUrl指向它。在这种情况下,不再需要隔离的范围了..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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