angular/angular.js — pull request #3254 by petebacondarwin (2013-07-17 12:18:07+00:00)
Title: fix(ngIf): destroy scope before removing element

Sometimes you want to work with the element that is being destroyed
from inside the $destroy handler for the scope. For instance you may
want to unbind a rd party library from an element. If the element is
already removed from the DOM before the $destroy handler is called
then you can no longer get hold of the element by id, for instance.

Closes #3237