Is there a way to trigger a function to reload the page when the user clicks the browser tab of my Angular app?
I believe this would be done with window.location.reload(), but I'm not sure how to make this line be triggered on tab selection.
I'm thinking this could be done by making the body/html have a "onfocus='reloadPage()'" attribute, but I don't want it to refresh 500 times as I'm moving my mouse around the page, just once when the tab is focused/clicked.