简体   繁体   中英

Popup close button is not working in angular6?

I have attached my popup box code here. The close button here is not working. Im totally new to angular 6. Can anyone help me with this?

<!-- Modal Header -->
<div class="modal-header">
  <h4 class="modal-title">selection</h4>
</div>
<form>
<!-- Modal body -->
<div class="modal-body">
    <h5>Enter value:</h5>
    <div class="form-group">
        <input name="Id" type="text" class="form-control shadow-sm" placeholder="Enter value">
    </div>
    <div class="form-group">
        <input name="name" type="text" class="form-control shadow-sm" placeholder="Enter name">
    </div>
</div>
<!-- Modal footer -->
<div class="modal-footer">
    <button type="button" class="btn btn-cancel shadow-sm" data-dismiss="modal">CLOSE</button>
    <button type="submit" class="btn btn-submit shadow-sm">SUBMIT</button>
</div>

Try this:

 import { DataModalComponent } from './patient-modal/patient-modal.component';
    import { NgbModal, NgbModalOptions } from '@ng-bootstrap/ng-bootstrap';


     let ngbModalOptions: NgbModalOptions = {
          backdrop : 'static',
          keyboard : false,
          size: "lg"
        }; 
        const modalRef = this.modalService.open(DataModalComponent ,ngbModalOptions);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM