ocombe / ocLazyLoad

Lazy load modules & components in AngularJS
https://oclazyload.readme.io
MIT License
2.63k stars 510 forks source link

Add an option to define a global default configuration #335

Open zhouzi opened 8 years ago

zhouzi commented 8 years ago

This PR adds a new option to define every modules defaults. Particularly useful when you want to completely deactivate the cache and use a custom cacheBuster, e.g:

angular
  .module('app', [
    'oc.lazyLoad',
  ])
  .config([
    '$ocLazyLoadProvider',
    function ($ocLazyLoadProvider) {
      $ocLazyLoadProvider.config({
        moduleDefaults: {
          cache: false
        }
      });
    }
  ]);

Related to #306 and #336

zhouzi commented 8 years ago

Please note that some loaders are not yet inheriting from moduleDefaults.

luismatesanz commented 8 years ago

When change is merge with master branch? I really need it.