Commit Graph

7 Commits

Author SHA1 Message Date
specialorange
3b30a4b64a docs(error/$injector/unpr): clarify which code is being referred to in the text
Closes #7020
2014-05-21 22:27:44 +01:00
Caitlin Potter
373078a94c revert: feat(injector): "strict-DI" mode which disables "automatic" function annotation
This reverts commit f5a04f59cf.
2014-04-14 20:17:22 -04:00
Caitlin Potter
f5a04f59cf feat(injector): "strict-DI" mode which disables "automatic" function annotation
This modifies the injector to prevent automatic annotation from occurring for a given injector.

This behaviour can be enabled when bootstrapping the application by using the attribute
"ng-strict-di" on the root element (the element containing "ng-app"), or alternatively by passing
an object with the property "strictDi" set to "true" in angular.bootstrap, when bootstrapping
manually.

JS example:

    angular.module("name", ["dependencies", "otherdeps"])
      .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.
      }]);

    angular.bootstrap(document, ["name"], {
      strictDi: true
    });

HTML:

    <html ng-app="name" ng-strict-di>
      <!-- ... -->
    </html>

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

Closes #6719
Closes #6717
Closes #4504
Closes #6069
Closes #3611
2014-04-11 00:15:32 -04:00
Brian Ford
bf2264e2aa docs(error/$injector/unpr): use Controller suffix 2014-03-25 17:13:40 -07:00
Igor Minar
2acc91098b docs(errors/$injector/nomod): add info about forgetting to load the module file
Closes #3752
2014-03-25 14:12:04 -07:00
Peter Bacon Darwin
4a6a3ba7fb docs(*): fix anchors for members in api docs 2014-02-21 19:37:37 +00:00
Peter Bacon Darwin
33e1bdc543 chore(errors): rename folders to match namespaces 2014-02-16 22:02:41 +00:00