Open royaldark opened 8 years ago
Most Angular libraries these days export (via CommonJS, AMD, etc.) their module name for ease of use. For example,
module.exports = 'afkl.lazyImage'
Then, requiring the library, for example via Browserify, becomes very simple:
angular.module('myModule', [ require('angular-lazy-image') ])
Even Angular core adheres to this pattern. Here is a great article with more information. It would be great if ng-lazy-image did this as well.
Thanks, i will look into this!
Most Angular libraries these days export (via CommonJS, AMD, etc.) their module name for ease of use. For example,
Then, requiring the library, for example via Browserify, becomes very simple:
Even Angular core adheres to this pattern. Here is a great article with more information. It would be great if ng-lazy-image did this as well.