我是使用angular ui bootstrap。我想定义一个通用的模态窗口,提供一些默认按钮,例如关闭、确定和标题等。
用户的模态窗口主体模板以模板url的形式提供。我该如何将用户的模态窗口主体模板合并到我的通用模态窗口模板中呢?
下面是我的通用模态窗口模板,modal-window.tpl.html:
感谢您的选择。
用户的模态窗口主体模板以模板url的形式提供。我该如何将用户的模态窗口主体模板合并到我的通用模态窗口模板中呢?
下面是我的通用模态窗口模板,modal-window.tpl.html:
<div class="modal-header"><h3>{{ ctrl.headerText }}</h3></div>
<div class="modal-body">
<<<< The user's template provided as URL should be embedded in here >>>
</div>
<div class="modal-footer">
<button type="button" class="btn" data-ng-click="ctrl.close()"> {{ctrl.closeButtonText}} </button>
<button class="btn btn-primary" data-ng-click="ctrl.ok();"> {{ctrl.actionButtonText}}</button>
</div>
感谢您的选择。