Ramco Ramco

Ramco Ramco

  • 442
  • 3.4k
  • 516.9k

delete confirmation modal using viewchild

May 10 2024 5:14 AM

Hi

  How to open delete confirmation modal using viewchild

<div class="modal fade" id="confirmationModal" tabindex="-1" aria-labelledby="confirmationModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="confirmationModalLabel">Confirmation</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                Are you sure you want to delete this item?
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
                <button type="button" class="btn btn-danger" (click)="confirmDelete()">Delete</button>
            </div>
        </div>
    </div>
  </div>
 

Thanks


Answers (4)