From 9e6e11ecae475696ccd2421571f3ba12d3f04e30 Mon Sep 17 00:00:00 2001 From: mariateresa Date: Wed, 22 Nov 2023 13:33:36 +0100 Subject: [PATCH] minor changes --- src/main/webapp/app/home/home.component.ts | 25 +++++++--------------- 1 file changed, 8 insertions(+), 17 deletions(-) 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)){