Skip to content

Commit

Permalink
chore: bump to 1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ocombe committed Oct 1, 2015
1 parent 886b631 commit 6c16c6b
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 17 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
<a name="1.0.6"></a>
# 1.0.6 (2015-10-01)


## Bug Fixes
- calling inject from loaders should pass the "real" module param
([953584e8](https://github.com/ocombe/ocLazyLoad/commit/953584e8989de7ed1c2166ca193c899bad8a3478),
[#221](https://github.com/ocombe/ocLazyLoad/issues/221))
- directive compile original contents after dependency is loaded.
([a48e3ceb](https://github.com/ocombe/ocLazyLoad/commit/a48e3ceba1945e74478a0a7f964f9aa84e027799),
[#168](https://github.com/ocombe/ocLazyLoad/issues/168),
[#194](https://github.com/ocombe/ocLazyLoad/issues/194))


<a name="1.0.5"></a>
# 1.0.5 (2015-09-11)

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oclazyload",
"version": "1.0.5",
"version": "1.0.6",
"description": "Load modules on demand (lazy load) with angularJS",
"main": "dist/ocLazyLoad.js",
"homepage": "https://github.com/ocombe/ocLazyLoad",
Expand Down
6 changes: 4 additions & 2 deletions dist/modules/ocLazyLoad.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,21 +610,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) {
Expand Down
2 changes: 1 addition & 1 deletion dist/modules/ocLazyLoad.loaders.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,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 () {
Expand Down
10 changes: 6 additions & 4 deletions dist/ocLazyLoad.js
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]>
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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 () {
Expand Down
4 changes: 2 additions & 2 deletions dist/ocLazyLoad.min.js

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions dist/ocLazyLoad.require.js
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]>
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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 () {
Expand Down
Loading

0 comments on commit 6c16c6b

Please sign in to comment.