theme spinner

This commit is contained in:
nixa 2016-05-17 17:42:13 +03:00
parent 00f6c0e6cb
commit 31c7843ab5
10 changed files with 58 additions and 13 deletions

View file

@ -1,7 +1,8 @@
import {Injectable} from '@angular/core'
import {BgMetrics} from './bgMetrics';
import {Subject} from 'rxjs/Subject';
import {BgMetrics} from './bgMetrics';
@Injectable()
export class BaCardBlurHelper {
private image:HTMLImageElement;

View file

@ -1,3 +1,4 @@
export * from './theme.spinner'
export * from './theme.constants'
export * from './theme.configProvider'
export * from './theme.config'

View file

@ -0,0 +1,3 @@
@import 'sass/conf/conf';
@import 'sass/preloader';
@import 'sass/ionicons';

View file

@ -5,7 +5,6 @@
@import "sass/buttons";
@import "sass/icons";
@import "sass/layout";
@import "sass/preloader";
@import "sass/socicon";
@import "sass/table";
@import "sass/form";

View file

@ -0,0 +1,22 @@
import {Injectable} from '@angular/core';
@Injectable()
export class BaThemeSpinner {
private _selector:string = 'preloader';
private _element:HTMLElement;
constructor() {
this._element = document.getElementById(this._selector);
}
public show():void {
this._element.style['display'] = 'block';
}
public hide(delay:number = 0):void {
setTimeout(() => {
this._element.style['display'] = 'none';
}, delay);
}
}