UNPKG

angular-hot-loader

Version:

🔥 Webpack Hot Module Replacement for Angular 1.x applications.

24 lines (18 loc) • 561 B
module.exports = function(moduleName, injectorArray) { this.strapped = false; if (this.strapped) { return this; } if (injectorArray) { injectorArray.push(require('../module').name); this.ANGULAR_MODULE = angular.module(moduleName, injectorArray); } else { angular.module(moduleName); } this.cache[moduleName] = this.cache[moduleName] || {}; this.MODULE_CACHE = this.cache[moduleName]; this.name = this.ANGULAR_MODULE.name; this.bootstrapElement = angular.element(this.element); this.strapped = true; return this; };