angular/angular.js — Issue #621: don't use the name of the angular script to look for ng:autobind
Author: IgorMinar
Created: 2011-10-25 00:32:26+00:00
State: open

We currently set restrictions on angular script filename in order to know where to look for ng:autobind.

This has burned several people, as it is not obvious that things work this way and it also means that if angular file is concatinated with another file, the resulting file must be called angular.something.js.

The filename restriction could be dropped if we simply looked for these attributes on the last script tag in the DOM.

This would obviously not work well for async loaded scripts (or if angular.js is included by a custom script loader), but in this case, ng:autobind can't be used anyway, and the developer will have to imperatively bootstrap the app.