ng-name-loader

1.0.0 • Public • Published

ng-name-loader

Webpack loader to export angular.js module name

Usage

require('ng-name?file!./file.js');
// adds following code to file.js source:
//  module.exports = 'file';

Example

// foo.js
angular.module('foo', []).controller('Foo', function Foo () {});
 
// app.js
angular.module('app', [
  require('ng-name?foo!./foo.js')
]);

Documentation: Using loaders

License

MIT (http://www.opensource.org/licenses/mit-license.php)

Package Sidebar

Install

npm i ng-name-loader

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • cesarandreu