Adder Global Loading spiner for api calls

This commit is contained in:
2024-04-28 15:32:15 +05:30
parent 1d53333667
commit c1250b7649
11 changed files with 178 additions and 9 deletions
+16
View File
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { LoaderService } from './loader.service';
describe('LoaderService', () => {
let service: LoaderService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(LoaderService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
+16
View File
@@ -0,0 +1,16 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class LoaderService {
private loading: boolean = false;
setLoading(loading: boolean){
this.loading = loading;
}
getLoading(): boolean{
return this.loading;
}
}