I need to attach some event to my popup
while my window is being closed and I can't figure out how to do this.
$scope.loginWithOk = function() {
var left, popup, top;
$window.$scope = $scope;
left = screen.width / 2 - 250;
top = screen.height / 2 - 250;
popup = $window.open('/auth/odnoklassniki', '', 'top=' + top + ',left=' + left + ',width=700,height=500');
};
How can I do this?
When I go with
popup.onclose = function() {
return alert(2222222222);
};
I can't see any alert so this option doesn't seem to be working.