nl

nginjector-loader

Webpack loader to resolve angular-injector functions

Showing:

Popularity

Downloads/wk

2

GitHub Stars

2

Maintenance

Last Commit

6yrs ago

Contributors

0

Package

Dependencies

1

Size (min+gzip)

17.3KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

ngInjector-loader

Webpack loader to resolve angular-injector functions

Simple wrapper around angular-injector to allow it to be used as a loader. Can be used as a config loader like so:

  module: {
    "loaders": [
      { "test": /\.js$/, "exclude": [/node_modules/], "loader": "ngInjector-loader" }
    ]
  }

Or it can be used as a require loader (but not the recommended use case) like so:

  require("ngInjector!./name/of/file.js")

The output of the above is to take functions wrapped in ng and output a function wrapped in an array with it's parameters properly injected.

input:

  ng( function ($scope, $attrs) {} )

output:

  ["$scope", "$attrs", function ($scope, $attrs) {}]

angular-inject docs:

https://www.npmjs.com/package/angular-injector

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100