Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

ngMock $TimeoutDecorator needs to declare dependencies #6069

Closed
mikew opened this issue Jan 31, 2014 · 1 comment
Closed

ngMock $TimeoutDecorator needs to declare dependencies #6069

mikew opened this issue Jan 31, 2014 · 1 comment

Comments

@mikew
Copy link

mikew commented Jan 31, 2014

just spent a while debugging DI error on minified code, turns out angular.mock.$TimeoutDecorator needs to declare $delegate and $browser as dependencies.

@caitp
Copy link
Contributor

caitp commented Apr 10, 2014

Are you saying you were using a minified version of angular-mocks? (why!?)

But they should work soon, #6719 should fix them.

@caitp caitp closed this as completed in 4b1695e Apr 10, 2014
caitp added a commit to caitp/angular.js that referenced this issue Apr 11, 2014
…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 angular#6719
Closes angular#6717
Closes angular#4504
Closes angular#6069
Closes angular#3611
caitp added a commit that referenced this issue Apr 11, 2014
…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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants