我用NG2模式,但它是没有得到打开或通过TS隐藏, 我的模板,如何隐藏和显示模式框在angular2
<modal id='saveeditsmodal'>
<modal-header>
<h4 class="modal-title">Editing item(s) in Recently Viewed</h4>
</modal-header>
<!-- Modal content-->
<modal-content>
<div class="modal-body">
<p>You have unsaved changes.</p>
</div>
<div class="modal-body">
<p>Are you sure you want to discard these changes?</p>
</div>
</modal-content>
<modal-footer>
<button type="button" class="btn btn-primary" data-dismiss="modal">Stay On List</button>
<button type="button" class="btn btn-default" data-dismiss="modal" (click)='closebox()'>Discard</button>
</modal-footer>
</modal>
我的TS,
$('#saveeditsmodal').show();
其实这是ng2模型,我不确定隐藏或显示的过程,任何人都可以提供帮助。谢谢。
检查他们Gh的网页,他们有例子的https:// github上。com/pleerock/ng2-modal/tree/master/sample –
但是它没有如何从ts文件关闭或打开。 – Arnold