aboutsummaryrefslogtreecommitdiffstats
path: root/src/loader.js
diff options
context:
space:
mode:
authorPete Bacon Darwin2013-11-20 10:35:27 +0000
committerIgor Minar2013-11-21 22:51:26 -0800
commit9e89a31b129e40c805178535c244899ffafb77d8 (patch)
tree15dd79635457a8a4e16130149e101420983d9fe1 /src/loader.js
parente6521e7491242504250b57dd0ee66af49e653c33 (diff)
downloadangular.js-9e89a31b129e40c805178535c244899ffafb77d8.tar.bz2
fix(loader): expose `$$minErr` to modules such as`ngResource`
This is highlighted in angular-phonecat when you try to use the index-async.html which needs to load the ngResource module asynchronously but fails when it tries to call `angular.$$minErr` to create the $resourceMinErr object. Closes #5050
Diffstat (limited to 'src/loader.js')
-rw-r--r--src/loader.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/loader.js b/src/loader.js
index b8d50917..787fcbfa 100644
--- a/src/loader.js
+++ b/src/loader.js
@@ -17,7 +17,12 @@ function setupModuleLoader(window) {
return obj[name] || (obj[name] = factory());
}
- return ensure(ensure(window, 'angular', Object), 'module', function() {
+ var angular = ensure(window, 'angular', Object);
+
+ // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap
+ angular.$$minErr = angular.$$minErr || minErr;
+
+ return ensure(angular, 'module', function() {
/** @type {Object.<string, angular.Module>} */
var modules = {};