Improved spinner logic and table design #130

This commit is contained in:
2023-02-18 12:42:51 +01:00
parent 7d67b08ce6
commit 43b6df2ba3
8 changed files with 438 additions and 387 deletions

View File

@@ -1,22 +1,23 @@
import { Injectable } from '@angular/core';
import { BehaviorSubject } from "rxjs";
@Injectable({
providedIn: 'root'
})
export class SpinnerService {
showSpinnerState = false;
showSpinnerState$ = new BehaviorSubject<boolean>(false);
constructor() { }
showSpinner() {
this.showSpinnerState = true;
this.showSpinnerState$.next(true);
}
hideSpinner() {
this.showSpinnerState = false;
this.showSpinnerState$.next(false);
}
toggleSpinner() {
this.showSpinnerState = !this.showSpinnerState;
this.showSpinnerState$.next(!this.showSpinnerState$.value);
}
}