title: Angular controller lifetime and event handling
body: <p>How to handle events (like <code>$rootScope</code> or socket events) in an Angular controller correctly? I'm facing the problem that my controllers aren't destroyed, which cause some problems when it comes to listening to specific events.</p>
  
  <p>To make it clear what I mean here's a plunker: <a href="http://plnkr.co/edit/CkXKUnpUdsbnZEjq8zLy?p=preview" rel="nofollow">http://plnkr.co/edit/CkXKUnpUdsbnZEjq8zLy?p=preview</a></p>
  
  <p>Triggering the rootscope event (by clicking on the button) in the first place works as intended: just one event is fetched. But navigating to <code>Route 2</code> and triggering the rootscope event again shows my problem; the event is fetched twice, since (at least that's my guess) both controllers are active now. Every route switch causes an additional event listener.</p>
  
  <p>How to handle this?</p>