Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
capture angular.bootstrap exception
  • Loading branch information
zskymn committed Jun 21, 2016
commit 83bc3f5ffe69edbb6b06bf42a2ba0733454fab2d
8 changes: 6 additions & 2 deletions src/deferred-bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ function doBootstrap (element, module, bootstrapConfig) {
var deferred = $q.defer();

angular.element(document).ready(function () {
angular.bootstrap(element, [module], bootstrapConfig);
try {
angular.bootstrap(element, [module], bootstrapConfig);
} catch (error) {
deferred.reject(error);
}
removeBodyClasses();

deferred.resolve(true);
Expand Down Expand Up @@ -168,7 +172,7 @@ function bootstrap (configParam) {
});
}

return $q.all(promises).then(handleResults, handleError);
return $q.all(promises).then(handleResults).then(null, handleError);
}

var deferredBootstrapper = {
Expand Down