Angular 6 close browser tab. close(); This piece of code on click function in angular but it showing blank page on current active tab but not closing the window. Feb 9, 2020 ยท I have a Angular 8 web application where an API is called whenever the browser is closed or the browser tab is closed where my application is running. 4. it not a anchor it is a button and here its using angular code we need to do this. In the listener, you can perform any cleanup tasks that you need to do before the tab is closed. open("about:blank", "_self"); window. open() method. refresh) in Angular requires a combination of event listeners and timing logic. Most people have their browser set to open new windows in a new tab, and you can't prevent the menu bar etc in a tab window. close(); But accounting for a security feature, that was introduced a few years ago, ordinary JavaScript lost its privilege to close the current tab, just by using this syntax. umsnl gnco kkxrh ibxrbk iwyfp wuh vmojax oclyhig pnbu tucmn