angular/angular.js — pull request #3089 by rwlogel (2013-06-28 16:36:28+00:00)
Title: Element data missing during $destroy

Changed the scope destroy to occur before the element is removed
from the DOM. This will ensure that things like the element.data()
structure aren't destroyed before scope.$destroy() is called.

Related to issue https://github.com/angular/angular.js/issues/2658