diff --git a/src/app/storyboard/module.js b/src/app/storyboard/module.js
index 82fb7027..b42e9080 100644
--- a/src/app/storyboard/module.js
+++ b/src/app/storyboard/module.js
@@ -62,6 +62,28 @@ angular.module('storyboard',
}
});
})
+ .run(function ($log, $rootScope, $document) {
+ 'use strict';
+
+ var resolvingClassName = 'resolving';
+ var body = $document.find('body');
+
+ // Apply a global class to the application when we're in the middle of
+ // a state resolution, as well as a global scope variable that UI views
+ // can switch on.
+ $rootScope.$on('$stateChangeStart', function () {
+ body.addClass(resolvingClassName);
+ $rootScope.isResolving = true;
+ });
+ $rootScope.$on('$stateChangeSuccess', function () {
+ body.removeClass(resolvingClassName);
+ $rootScope.isResolving = false;
+ });
+ $rootScope.$on('$stateChangeError', function () {
+ body.removeClass(resolvingClassName);
+ $rootScope.isResolving = false;
+ });
+ })
.run(function ($log, $rootScope, $state) {
'use strict';
diff --git a/src/index.html b/src/index.html
index d3f5edf2..e6c663fd 100644
--- a/src/index.html
+++ b/src/index.html
@@ -50,7 +50,19 @@
+
+
+