I'd like to check if the user is currently viewing the browser tab, like if you are at google chrome and you have facebook, twitter and the application, and you want to know if the application is selected between all 3. Is there a way to do it with purely with angular or do I need to do something like this:
$(window).focus(function() {
console.log('enter');
}).blur(function() {
console.log('out');
});