How to instantiate In angular2 ngx-bootstrap modal when the modal is open
问题 This is my parent component template fragment: <button type="button" (click)="addModal.show();">Add</button> <add-modal #addModal></add-modal> And this is my modal component: Component({ selector: 'card-add-modal', template: ` <div *ngIf="isShowModal" bsModal #addModal="bs-modal" [config]="{show: true, backdrop: 'static'}" (onHidden)="onHidden()" class="modal fade"> <!-- header... --> <div class="modal-body"> <input type="text" name="name" id="name" [(ngModel)]="model.test"> </div> <!--