Opening external link and closing it at an event

You can use _system instead of _blank there for the system default action will be triggered like opening in system browser.

Please use $window in angularjs context instead of window.

Then you store your $window.open(…) to a variable and add eventlisteners like ‘loadstart’ to parse window url to trigger special actions or close event and so on.