mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-17 07:50:12 +01:00
fix(preloader): missed file
This commit is contained in:
parent
d1f368e571
commit
d2fadd02d2
1 changed files with 16 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
||||||
|
import {Injectable} from '@angular/core';
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class BaImageLoaderService {
|
||||||
|
|
||||||
|
public load(src):Promise<any> {
|
||||||
|
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let img = new Image();
|
||||||
|
img.src = src;
|
||||||
|
img.onload = function(){
|
||||||
|
resolve('Image with src ' + src + ' loaded successfully.');
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue