There are multiple windows in my project.I am using angular 1 I want to identify event when user close the window.
I have tried below function but it is not working in Fire Fox and Chrome as well as I am not able detect which window is closed
$window.onbeforeunload = function (event) {
alert("Hi");
};
Please Help me How can I Identify event when user close particular window also How can I Detect which window is closed?