diff --git a/src/main/webapp/app/home/home.component.ts b/src/main/webapp/app/home/home.component.ts index 5f4a541..bae8e42 100644 --- a/src/main/webapp/app/home/home.component.ts +++ b/src/main/webapp/app/home/home.component.ts @@ -69,9 +69,14 @@ export class HomeComponent implements OnInit { }); //TODO: DEBUG HERE - //vedi: https://medium.com/swlh/angular-loading-spinner-using-http-interceptor-63c1bb76517b - //per ora ascolto solo il caricamento dei contesti - this.listenToLoading(); + //sembra tutto giusto, ma non viene rilevato l'aggiornamento del valore booleano + + this.progressService.getState() + .subscribe((loading) => { + this.loading = loading; + console.debug("**********this.loading..."+this.loading); + }); + // per la form dei contesti this.ctxLoaderService.fetchAll().subscribe(res => { this.allCtxs = res; @@ -84,20 +89,6 @@ export class HomeComponent implements OnInit { } - /** - * Listen to the loadingSub property in the LoadingService class. This drives the - * display of the loading spinner. - */ - - listenToLoading(): void { - this.progressService.getState() - .subscribe((loading) => { - this.loading = loading; - console.debug("**********this.loading..."+this.loading); - }); - } - - //mettere ANY come tipo dell'argomento per evitare errore TypeScript nella map!! filterContexts(/*ctx: IContextNode,*/ item: any): IContextNode[] { if(!instanceOfContext(item)){