mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +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() {
|
||||
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.<*>>} */
|
||||
|
|
|
|||
|
|
@ -68,6 +68,8 @@ describe('module loader', function() {
|
|||
it('should complain of no module', function() {
|
||||
expect(function() {
|
||||
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