summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/directives/loader
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/directives/loader')
-rw-r--r--catalog-ui/src/app/directives/loader/loader-directive.ts21
1 files changed, 8 insertions, 13 deletions
diff --git a/catalog-ui/src/app/directives/loader/loader-directive.ts b/catalog-ui/src/app/directives/loader/loader-directive.ts
index 36efc22079..7e056c774f 100644
--- a/catalog-ui/src/app/directives/loader/loader-directive.ts
+++ b/catalog-ui/src/app/directives/loader/loader-directive.ts
@@ -56,19 +56,14 @@ export class LoaderDirective implements ng.IDirective {
let interval;
- this.EventListenerService.registerObserverCallback(EVENTS.SHOW_LOADER_EVENT, (loaderType)=> {
- if (scope.loaderType !== loaderType) {
- return;
- }
- scope.display = true;
- });
- this.EventListenerService.registerObserverCallback(EVENTS.HIDE_LOADER_EVENT, (loaderType)=> {
- if (scope.loaderType !== loaderType) {
- return;
- }
- scope.display = false;
- });
-
+ if(scope.loaderType) {
+ this.EventListenerService.registerObserverCallback(EVENTS.SHOW_LOADER_EVENT + scope.loaderType, (loaderType)=> {
+ scope.display = true;
+ });
+ this.EventListenerService.registerObserverCallback(EVENTS.HIDE_LOADER_EVENT + scope.loaderType, (loaderType)=> {
+ scope.display = false;
+ });
+ }
let calculateSizesForFixPosition = (positionStyle:string):void => {
// This is problematic, I do not want to change the parent position.
// set the loader on all the screen