【发布时间】:2015-09-10 10:10:31
【问题描述】:
我正在尝试查看是否有一种使用自定义指令来选择地址的好方法来实现 ng-bootbox。
这是一个基本示例
<button class="btn btn-lg btn-primary"
ng-bootbox-title="A cool title!"
ng-bootbox-custom-dialog="<h1>zzzzzzzzzzzzzzz!</h1>"
ng-bootbox-buttons="customDialogButtons"
ng-bootbox-options="dialogOptions">
Custom dialog with template
</button>
这里我有引号必须匹配的消息。我也试过这个:
ng-bootbox-custom-dialog="<h1>zzzzzzzzzzzzzzz!<'/'h1>"
这样做破坏了我的 H1 并呈现了这个
'/'h1>"
我最终想这样做:
ng-bootbox-custom-dialog="<qas-modal-find-postcode address='record.address' town='record.town' county='record.County' post-code='record.postcode'></qas-modal-find-postcode>"
按钮在模态中加载指令,我有一些两种方式的绑定可以使用。
我想知道一个好的方法。我没有使用引导模式,因为我遇到了多个 Id 相同的冲突。
Plunker:
【问题讨论】:
-
一个这样的样本 plunker 会很棒
-
@ManuelMiranda 你说得很好。我会设置一个。
标签: html angularjs bootstrap-modal bootbox html-escape-characters