airfranceklm / ng-lazy-image

Angular directive for loading responsive image when container (which is preventing reflow) is in viewport.
http://afklm.github.io/ng-lazy-image/
MIT License
351 stars 64 forks source link

Export Angular module name #54

Open royaldark opened 8 years ago

royaldark commented 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.

SquadraCorse commented 8 years ago

Thanks, i will look into this!