angular/angular.js — pull request #3411 by jeffbcross (2013-07-31 22:44:44+00:00)
Title: fix(re-bootstrap): Throw an error when bootstrapping a bootstrapped element

Nothing would prevent a user from accidentally calling angular.bootstrap on an element that had already been bootstrapped. If this was done, odd behavior could manifest in an application, causing different scopes to update the same DOM, and causing debugger confusion.

This fix adds a check inside of angular.bootstrap to check if the passed-in element already contains a class of ng-scope, and if so, will throw an error.