It's enough to only add LazyLoadImageModule
under imports, no need to specify LazyLoadImageDirective
under declarations.
Are you using SSR? If so, then make sure to include LazyLoadImageModule
under imports in your shared app.module. Or if you don't have a shared one, then include it in both, client and server app.modules.
It's working fine for me on Angular 5.1.0
I tried to import LazyLoadImageModule results in shared.module and found that the problem was solved.
Sorry, I use Google Translate.
thank yooooooooooou!!
@sapierens
Glad your problem was salved @muxi2015
Thanks, @sapierens!
Most helpful comment
It's enough to only add
LazyLoadImageModule
under imports, no need to specifyLazyLoadImageDirective
under declarations.Are you using SSR? If so, then make sure to include
LazyLoadImageModule
under imports in your shared app.module. Or if you don't have a shared one, then include it in both, client and server app.modules.It's working fine for me on Angular 5.1.0