Skip to content

Commit 3d5a36d

Browse files
author
Philipp Denzler
committed
Remove error class after successful bootstrap
Remove error class after successful bootstrap, fixes [#32](#32)
1 parent d26345f commit 3d5a36d

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

changelog.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 0.1.6 - 2015-04-09
4+
- Remove error class after successful bootstrap, fixes [#32](https://github.com/philippd/angular-deferred-bootstrap/issues/32)
5+
36
## 0.1.5 - 2014-10-08
47
- Fixed call of resolve function to not fail if angular.forEach passes the object as third argument in each iteration (Angular > 1.3.0-rc.1), see [#20](https://github.com/philippd/angular-deferred-bootstrap/issues/20)
58
- Pass additional configuration to bootstrap the AngularJS app (for example ```strictDi``` mode), implemented by [@jeffsheets](https://github.com/jeffsheets), see [#23](https://github.com/philippd/angular-deferred-bootstrap/pull/23)

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-deferred-bootstrap",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"description": "Initialize AngularJS apps with constants loaded from the back-end",
55
"homepage": "https://github.com/philippd/angular-deferred-bootstrap",
66
"repository": {

src/deferred-bootstrap.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ function addLoadingClass () {
1414
bodyElement.addClass(loadingClass);
1515
}
1616

17-
function removeLoadingClass () {
17+
function removeBodyClasses () {
1818
bodyElement.removeClass(loadingClass);
19+
bodyElement.removeClass(errorClass);
1920
}
2021

2122
function addErrorClass () {
22-
removeLoadingClass();
23+
removeBodyClasses();
2324
bodyElement.addClass(errorClass);
2425
}
2526

@@ -90,7 +91,7 @@ function doBootstrap (element, module, bootstrapConfig) {
9091

9192
angular.element(document).ready(function () {
9293
angular.bootstrap(element, [module], bootstrapConfig);
93-
removeLoadingClass();
94+
removeBodyClasses();
9495

9596
deferred.resolve(true);
9697
});
@@ -172,4 +173,4 @@ function bootstrap (configParam) {
172173

173174
window.deferredBootstrapper = {
174175
bootstrap: bootstrap
175-
};
176+
};

0 commit comments

Comments
 (0)