Pentiado/angular-lazy-img

Inject the angular-lazy-img module in your application.

Opened this issue · 0 comments

Hi, im using ionic 3 and angular 5. where do i put this code?

angular.module('your.module', [ 'angularLazyImg' ]);

I tried to put it after the export class AppModule in app.module.ts but there is an error and the suggestions are not helping

This is the code in my app.module.ts:

`import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule, Slide, Slides } from 'ionic-angular';
import { FormControl, FormGroup, Validator } from "@angular/forms";

import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { ListPage } from '../pages/list/list';
import { Year2018Page } from '../pages/year2018/year2018';
import { Year2017Page } from '../pages/year2017/year2017';
import { Year2016Page } from '../pages/year2016/year2016';
import { AboutPage } from "../pages/about/about";
import { March2018pdfPage } from "../pages/march2018pdf/march2018pdf";
import { ContactusPage } from '../pages/contactus/contactus';
import { LoginPage } from "../pages/login/login";
import { RegisterPage } from "../pages/register/register";
//import { SplashPage } from '../pages/splash/splash';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { IonicImageViewerModule } from 'ionic-img-viewer';
import { February2018pdfPage } from '../pages/february2018pdf/february2018pdf';
import { January2018pdfPage } from '../pages/january2018pdf/january2018pdf';

//import { InAppBrowser } from '@ionic-native/in-app-browser';
//import { DocumentViewer } from '@ionic-native/document-viewer';

@NgModule({
declarations: [
MyApp,
HomePage,
ListPage,
Year2018Page,
Year2017Page,
Year2016Page,
AboutPage,
March2018pdfPage,
February2018pdfPage,
January2018pdfPage,
ContactusPage,
LoginPage,
RegisterPage
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp),
IonicImageViewerModule,
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage,
ListPage,
Year2018Page,
Year2017Page,
Year2016Page,
AboutPage,
March2018pdfPage,
February2018pdfPage,
January2018pdfPage,
ContactusPage,
LoginPage,
RegisterPage
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler},
//InAppBrowser,
//DocumentViewer,
]
})
export class AppModule {}`