如何使用代码如.open或.show打开ngx-bootstrap模式

时间:2017-08-10 05:23:38

标签: javascript jquery twitter-bootstrap angular2-forms ngx-bootstrap

这里我是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">&times;</span>
        </button>
    </div>
    <div class="modal-body">
 </div>
</template>

0 个答案:

没有答案