mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-05-18 04:03:45 +08:00
@@ -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.");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user