0

我正在使用 Angular 的官方 Bootstrap UI,并且在 ui.bootstrap.popover 的模板中呈现表达式时遇到问题。

这是我的 HTML 中的一个组件:

<edit-button url="myurl.php" form="myNewForm"></edit-button>

它的模板如下:

<button uib-popover-template="app/edit.html"></button>

而且,这里是edit.html

{{1+1}}

我收到此错误:

无法识别的表达式:{{1+1}}

我该怎么办?这里有什么问题?我实际上是在尝试使用SchemaForm指令而不是 {{1+1}}。

4

1 回答 1

0

您需要将模板放在简单的引号内,如下所示:

<button uib-popover-template="'app/edit.html'"></button>
于 2017-06-02T10:36:29.160 回答