Here is an example of a modal in HTML code:
<app-modal #modal1>
<div class="app-modal-header">
header
</div>
<div class="app-modal-body">
You can add any content you like here, such as form fields.
<input type="text">
</div>
<div class="app-modal-footer">
<button type="button" class="btn btn-default" (click)="modal1.hide()">Close</button>
<button type="button" class="btn btn-default" (click)="modal2.show()">Show modal 2</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</app-modal>
I would like to display this modal when a tab is clicked. How can I show or hide this modal from a TypeScript file using a method?