I'm using deferredBootstrapper with a resolve block, but not a moduleResolves block, like this:
window.deferredBootstrapper.bootstrap({
element: window.document.body,
module: 'main',
injectorModules: ['bootstrapper.service'],
resolve: {
AppProps: ['bootstrapperService', function (bootstrapperService) {
return bootstrapperService.getAppProps();
}]
}
});
After upgrading to AngularJS 1.3.0-rc.1 the app fails to load with an error like:
Error: [$injector:nomod] Module '{"AppProps":["bootstrapperService",null]}' 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.
After some debugging it appears this commit to angular that added a parameter to the forEach loop is the cause of the bug: angular/angular.js@df9e60c
In any case, a valid workaround appears to be using a moduleResolves and specifying your main module, like this:
window.deferredBootstrapper.bootstrap({
element: window.document.body,
module: 'main',
injectorModules: ['bootstrapper.service'],
moduleResolves: [
{
module: 'main',
resolve: {
AppProps: ['bootstrapperService', function (bootstrapperService) {
return bootstrapperService.getAppProps();
}]
}
}
]
});