title: Angular, how to react to a window resize event
body: <p>In a non angular application we can respond to window resize events with the following:</p>
  
  <pre><code>  window.onresize = function(event) {
      console.log('changed');
    };
  </code></pre>
  
  <p>However we can't use this in angular applications since it's a bad practice to directly access the window object. How would we implement the above functionality in the 'angular' way?</p>