Skip to content

Commit

Permalink
Merge pull request #291 from circlingthesun/fix-system-js-hot-reload
Browse files Browse the repository at this point in the history
Fixes hot reloading via systemjs-hot-reloader
  • Loading branch information
ocombe authored Sep 5, 2016
2 parents 8139bb9 + 9408848 commit 17c0885
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/ocLazyLoad.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,16 @@

var bootstrapFct = angular.bootstrap;
angular.bootstrap = function(element, modules, config) {
// Clean state from previous bootstrap
regModules = ['ng', 'oc.lazyLoad'];
regInvokes = {};
regConfigs = [];
modulesToLoad = [];
realModules = [];
recordDeclarations = [];
broadcast = angular.noop;
runBlocks = {};
justLoaded = [];
// we use slice to make a clean copy
angular.forEach(modules.slice(), module => {
_addToLoadList(module, true, true);
Expand Down

0 comments on commit 17c0885

Please sign in to comment.