Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modules within closures #42

Open
brunofin opened this issue Dec 14, 2015 · 1 comment
Open

Modules within closures #42

brunofin opened this issue Dec 14, 2015 · 1 comment

Comments

@brunofin
Copy link

Hello, first I want to say thanks for such awesome plugin.

I want to ask whether will it work correctly for modules that are created within JS closures. I tend to keep this pattern for my Angular modules, for example:

(function(angular) {
  var app = angular.module('dgDAO', []);

  app.service('API', ['$http', function($http) {
    /* Base API service */
    var API = {
      baseURL: '/api',
      describeAPI: function() {
        return $http({
          method: 'OPTIONS',
          url: API.baseURL
        })
      }
    }
    return API;
  }]);
})(window.angular);

Will it work with such module?

@joakimbeng
Copy link
Member

I do think so, but haven't tried it myself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants