angular/angular.js — pull request #6719 by caitp (2014-03-17 20:42:05+00:00)
Title: feat(injector): optionally disable automatic function annotation

This modifies the injector to prevent automatic annotation from occurring for
a given injector.

This works by passing a `true` as the 3rd or 4th parameter to
createInjector(), or alternatively to angular.module.

```js angular.module("name", ["dependencies", "otherdeps"], configFn, true)
.provider("$willBreak", function() {
this.$get = function($rootScope) {
};
})
.run(["$willBreak", function($willBreak) {
// This block will never run because the noMagic flag was set to true, and
the $willBreak
// '$get' function does not have an explicit annotation.
});
```

This will only affect functions with an arity greater than 0, and without an
$inject property.

---

This may not be the perfect implementation, and there is still no proper error
definition, so there's a bit more to do here.

Related: #6717