这里我是Ang2和ngx-bootstrap的新手请Helpem如何使用.open或.show代码打开Modal在ng2-bs3中我们选择@ViewChild('modal') modal: ModalComponent;
此代码我们this.modal.open();
赞本代码我需要
<button type="button" class="btn btn-primary" (click)="openModalWithComponent(template)">Create modal with component</button>
<template #template>
<div class="modal-header">
<h4 class="modal-title pull-left">Modal</h4>
<button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
</div>
</template>