mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-16 18:51:06 +00:00
parent
31631b2b28
commit
e82d780c2e
2 changed files with 6 additions and 2 deletions
|
|
@ -70,7 +70,9 @@ function setupModuleLoader(window) {
|
||||||
}
|
}
|
||||||
return ensure(modules, name, function() {
|
return ensure(modules, name, function() {
|
||||||
if (!requires) {
|
if (!requires) {
|
||||||
throw minErr('$injector')('nomod', "Module '{0}' is not available! You either misspelled the module name or forgot to load it.", name);
|
throw minErr('$injector')('nomod', "Module '{0}' is not available! You either misspelled the module name " +
|
||||||
|
"or forgot to load it. If registering a module ensure that you specify the dependencies as the second " +
|
||||||
|
"argument.", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @type {!Array.<Array.<*>>} */
|
/** @type {!Array.<Array.<*>>} */
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,8 @@ describe('module loader', function() {
|
||||||
it('should complain of no module', function() {
|
it('should complain of no module', function() {
|
||||||
expect(function() {
|
expect(function() {
|
||||||
window.angular.module('dontExist');
|
window.angular.module('dontExist');
|
||||||
}).toThrow("[$injector:nomod] Module 'dontExist' is not available! You either misspelled the module name or forgot to load it.");
|
}).toThrow("[$injector:nomod] Module 'dontExist' is not available! You either misspelled the module name " +
|
||||||
|
"or forgot to load it. If registering a module ensure that you specify the dependencies as the second " +
|
||||||
|
"argument.");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue