To exit a window or Angular page I have created an Exit button in the .html. To make the button work I want to write a method in the .ts file that will help me simply close the page. Note: I am using Angular11 and Bootstrap 4.
Help me write the method.
I'd suggest you share a piece of code you have tried first before asking the question like that. Anyways here's something you can do:
In Html:
<button type="button" class="btn btn-link" (click)="closePage()">Close Page</button>
In TS:
closePage(){
window.close();
}