2

I have problems running the this plugin. I use this cli. I have add

import { ImageLazyLoadModule, WebWorkerService } from "ng2-image-lazy-load";
  imports: [ // import Angular's modules
 ...
    ImageLazyLoadModule,
  ...
    }),
    ...
  ],

and (which I am not sure is this the problem)

WebWorkerService.workerUrl = '../assets/js/xhrWorker.js';

here. At the html of my Component I have only this:

<div imageLazyLoadArea>
    <div>
      <img [imageLazyLoadItem]="img" alt="{{ name }}">
    </div>
</div>

where "img" and "name" are @Inputs from parent Component. Does my mistake is way of import of xhrWorker.js file? (I do have included)

import { BrowserModule } from '@angular/platform-browser';
import {HttpModule, Http} from '@angular/http';
Pengyy
  • 32,927
  • 15
  • 76
  • 70
IntoTheDeep
  • 3,337
  • 11
  • 34
  • 69

0 Answers0