1

I opened new window in angular 2 using window.open(MyURL,title,options). I need a callback when this popup window is closed. New in angular 2.

Thanks in advance.

1 Answer 1

2

You can use the onbeforeunload event

let myWindow = window.open(MyURL, title, options);
myWindow.onbeforeunload = () => {
  //Do something
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.