【发布时间】:2015-09-22 20:51:24
【问题描述】:
我无法将 popover-html 设置为角度表达式。
例如 角度标记
<script type="text/ng-template" id="something.html">
<button>dummy</button>
</script>
<button popover-is-open="sm.isOpen"
popover-template="'something.html'"
popover-placement="top" popover-title="sm.popoverTitle"/>
控制器代码
function activate(){
$scope.sm={};
$scope.sm.isOpen=true;
$scope.sm.popoverTitle=" Functionality <button>close</button>";
}
activate();
弹出框标题呈现为“sm.popoverTitle”,而不是我指定的 html 标记。
我正在使用 Angular UI Bootstrap 版本 0.13.4
【问题讨论】:
-
你试过用括号括起来吗? {{sm.popoverTitle}}
-
你真是个该死的天才!!!请添加为答案,以便我接受。这东西太乱了。 popover-is-open 不必包含在 {} 中,但 popover-title 可以。看起来不一致接近成为一个错误
标签: javascript angularjs angular-ui-bootstrap