ocombe / ocLazyLoad

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

When using "serie" = true, loading multiple modules only serializes first file from each module #315

Open brphelps opened 8 years ago

brphelps commented 8 years ago

This looks like a bug, wanting to verify it is a bug before getting a PR ready. Right now, running code like this:

    return $ocLazyLoad.load(['moduleA'], {
          serie: true
    })
   .then(function() {
          return $ocLazyLoad.load(['moduleB'], {
              serie: true
          });
   });

Will work significantly different than running this:

 return $ocLazyLoad.load(['moduleA', 'moduleB'], {
          serie: true
    })

The latter case will load the first file from both moduleA's file list and moduleB's file list serially, and then all others are intermixed.