title: Angular JS Directive Unloading Event or Equivalent
body: <p>So, I have these widgets:</p>
  
  <pre><code>&lt;widget ng-repeat="widget in widgets"&gt;&lt;/widget&gt;
  </code></pre>
  
  <p>As you can tell, they are created and removed by the <code>ng-repeat</code>.</p>
  
  <p>So when someone does remove a widget, is there any where in the directive I can catch the event happening OR equivalent?</p>
  
  <pre><code>.directive('widget', function widget() {
      var directive = { 
          restrict: 'E',
          compile: compile
      };
  
      return directive;
  
      function compile() {
          return {
              pre: preLink,
              post: postLink
          };
      }
  
      function preLink(scope, element) {
  
      }
  
      function postLink(scope, element) {
  
      }
  });
  </code></pre>