-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
37 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* oclazyload - Load modules on demand (lazy load) with angularJS | ||
* @version v1.0.5 | ||
* @version v1.0.6 | ||
* @link https://github.com/ocombe/ocLazyLoad | ||
* @license MIT | ||
* @author Olivier Combe <[email protected]> | ||
|
@@ -617,21 +617,23 @@ | |
* Inject new modules into Angular | ||
* @param moduleName | ||
* @param localParams | ||
* @param real | ||
*/ | ||
inject: function inject(moduleName) { | ||
var localParams = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | ||
var real = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; | ||
|
||
var self = this, | ||
deferred = $q.defer(); | ||
if (angular.isDefined(moduleName) && moduleName !== null) { | ||
if (angular.isArray(moduleName)) { | ||
var promisesList = []; | ||
angular.forEach(moduleName, function (module) { | ||
promisesList.push(self.inject(module)); | ||
promisesList.push(self.inject(moduleName, localParams, real)); | ||
}); | ||
return $q.all(promisesList); | ||
} else { | ||
self._addToLoadList(self._getModuleName(moduleName), true); | ||
self._addToLoadList(self._getModuleName(moduleName), true, real); | ||
} | ||
} | ||
if (modulesToLoad.length > 0) { | ||
|
@@ -1123,7 +1125,7 @@ | |
|
||
// if someone used an external loader and called the load function with just the module name | ||
if (angular.isUndefined(config.files) && angular.isDefined(config.name) && $delegate.moduleExists(config.name)) { | ||
return $delegate.inject(config.name, localParams); | ||
return $delegate.inject(config.name, localParams, true); | ||
} | ||
|
||
$delegate.filesLoader(config, localParams).then(function () { | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* oclazyload - Load modules on demand (lazy load) with angularJS | ||
* @version v1.0.5 | ||
* @version v1.0.6 | ||
* @link https://github.com/ocombe/ocLazyLoad | ||
* @license MIT | ||
* @author Olivier Combe <[email protected]> | ||
|
@@ -617,21 +617,23 @@ | |
* Inject new modules into Angular | ||
* @param moduleName | ||
* @param localParams | ||
* @param real | ||
*/ | ||
inject: function inject(moduleName) { | ||
var localParams = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | ||
var real = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; | ||
|
||
var self = this, | ||
deferred = $q.defer(); | ||
if (angular.isDefined(moduleName) && moduleName !== null) { | ||
if (angular.isArray(moduleName)) { | ||
var promisesList = []; | ||
angular.forEach(moduleName, function (module) { | ||
promisesList.push(self.inject(module)); | ||
promisesList.push(self.inject(moduleName, localParams, real)); | ||
}); | ||
return $q.all(promisesList); | ||
} else { | ||
self._addToLoadList(self._getModuleName(moduleName), true); | ||
self._addToLoadList(self._getModuleName(moduleName), true, real); | ||
} | ||
} | ||
if (modulesToLoad.length > 0) { | ||
|
@@ -1123,7 +1125,7 @@ | |
|
||
// if someone used an external loader and called the load function with just the module name | ||
if (angular.isUndefined(config.files) && angular.isDefined(config.name) && $delegate.moduleExists(config.name)) { | ||
return $delegate.inject(config.name, localParams); | ||
return $delegate.inject(config.name, localParams, true); | ||
} | ||
|
||
$delegate.filesLoader(config, localParams).then(function () { | ||
|
Oops, something went wrong.