ionic-image-loader
Version:
Ionic Component and Service to load images in a background thread and cache them for later use
33 lines (31 loc) • 878 B
text/typescript
import { HttpClientModule } from '@angular/common/http';
import { ModuleWithProviders, NgModule } from '@angular/core';
import { File } from '@ionic-native/file';
import { IonicModule } from 'ionic-angular';
import { ImgLoaderComponent } from './components/img-loader';
import { ImageLoader } from './providers/image-loader';
import { ImageLoaderConfig } from './providers/image-loader-config';
({
declarations: [
ImgLoaderComponent,
],
imports: [
IonicModule,
HttpClientModule,
],
exports: [
ImgLoaderComponent,
],
})
export class IonicImageLoader {
static forRoot(): ModuleWithProviders {
return {
ngModule: IonicImageLoader,
providers: [
ImageLoaderConfig,
ImageLoader,
File,
],
};
}
}