title: AngularJS css animation + done callback
body: <p>I am using AngularJS and would like to get notified when an animation is done. I know this can be done with javascript-defined animations like this <code>myApp.animation(...)</code>, but I am curious if I can do this without javascript.</p>
  
  <p><strong>Question:</strong> Is it possible to use angular <strong><em>ng-enter</em></strong> and <strong><em>ng-leave</em></strong> css-transitions, and specify a done callback? I guess the <code>animationend</code> event is fired, so there should be a way to do this.</p>
  
  <p>I have this:</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;div ng-if="item" class="myDiv"&gt; {{ item.name }} &lt;/div&gt;
  </code></pre>
  
  <p><strong>CSS:</strong></p>
  
  <pre><code>.myDiv.ng-enter {...}
  .myDiv.ng-enter.ng-enter-active {...}
  .myDiv.ng-leave {...}
  .myDiv.ng-leave.ng-leave-active {...}
  </code></pre>
  
  <p>And I want to call <code>myDone()</code> when the animation has finished (i.e. after the <code>ng-enter-active</code> class is removed).</p>