我们有一个Angular Bootstrap popover工具提示,其中包含一些html内容和范围变量以及popover内的按钮。
目前我们有small version running in Plunkr并且正确显示了popover html,包括所有中断标记。
当我们在Visual Studio中本地运行时,在渲染按钮之前识别所有中断标记,然后它似乎被完全忽略并且按钮在弹出框的顶部被删除时,似乎会出现问题: / p>
<div>
Name: {{ person.fullName }}
<br />
Dept: {{ person.deptId }}
<br />
Job Desc: {{ person.jobDesc}}
<br />
Phone:{{ person.phone}}
<br />
One!<br />
Two!<br />
Three!<br />
<input type="button" value="Click Me" class="btn btn-default" ng-click="changeName()">
我们看到了几个帖子,其中使用了$ sce.trustAsHtml并添加了以及data-html ='true'
scope.htmlPopover = $sce.trustAsHtml('./HTML/popoverTemplate.html');
element[0].setAttribute('data-html', 'true');
element[0].setAttribute('uib-popover-template', "htmlPopover");
element[0].setAttribute('popover-append-to-body', 'true');
element[0].setAttribute('popover-trigger', "'click'");
这并没有解决我们的问题。
Plunk和我们的本地项目都运行Angular 1.6.2和Angular Bootstrap 2.5.0。
无法弄清楚为什么这会在Plunkr中运行而不在Visual Studio中。
我错过了什么吗?
感谢。