【发布时间】:2016-01-14 16:47:18
【问题描述】:
我正在尝试使用“dacc.getSearchResultHTML()”函数动态绑定“uib-popover-title”来更改弹出框的内容,但更新“dacc.codeJerarchy.parent”对象只会更改弹出框的标题。
我遗漏了什么还是需要重新定义 HTML 元素?这是我目前更新内容的唯一方法。
谢谢!
<button uib-popover-html="'{{ dacc.getSearchResultHTML(dacc.codeJerarchy.parent) }}'"
popover-title="{{ dacc.codeJerarchy.parent.short }}"
popover-placement="right"
popover-append-to-body="true" type="button"
class="btn btn-sm btn-default">i</button>
//-------------------------------------------
dacc.getSearchResultHTML = function(searchResult) {
return $sce.trustAsHtml(he.encode(he.escape(searchResult.long)).replace(/\n/g, '<br />'));
};
【问题讨论】:
标签: angularjs twitter-bootstrap angular-ui popover