requirejs-angular-define icon indicating copy to clipboard operation
requirejs-angular-define copied to clipboard

Enable late binding of sub-module names

Open nikku opened this issue 12 years ago • 0 comments

It should not be neccessary to specify the names of required modules if a AMD path is specified as a module defining location.

If a dependent AngularJS module is defined at a AMD path, its name should be captured and used to specify the AngularJS module dependency.

Consider the following example:

/other-module.js:


ngDefine('other.module', function(module) {
  // module definition
});

Defines a named AngularJS module other.module.

module.js:

ngDefine('some.plugin', [
  'module:/other-module'
], function(module) {
});

Should define a module equivalent to angular.module('some.plugin', ['other.module']) after the AMD path /other-module has been resolved.

nikku avatar Nov 11 '13 16:11 nikku