title: How to write window closing event handler in angular 2?
body: <p>How to write window closing event handler in <code>Angular 2</code>, by that I mean closing not refreshing. </p>
  
  <p>So I can't use <code>window.onBeforeunLoad();</code></p>