All files / src/services/zd-loading loading-service.ts

100% Statements 3/3
100% Branches 0/0
100% Functions 2/2
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25          93x                 1x             1x      
import { ILoading } from '../..';
 
/**
 * Loading Service Class
 */
export class LoadingService {
	public static loading: ILoading;
 
	/**
	 * Displays a Loading.
	 * If has an opened Loading it will be closed.
	 * @param Loading loading structure
	 */
	public static show(text?: string): void {
		LoadingService.loading.show(text);
	}
 
	/**
	 * Hides current Loading
	 */
	public static hide(): void {
		LoadingService.loading.hide();
	}
}