Ng-lazyload-image: ng: Can't bind to 'lazyLoad' since it isn't a known property of 'img'

Created on 9 Dec 2017  ·  3Comments  ·  Source: tjoskar/ng-lazyload-image




last pic:http://wx1.sinaimg.cn/mw690/9b5fc159ly1fmahepbh5vj20er0asmxs.jpg

i use ng version:5

Most helpful comment

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

All 3 comments

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!

Was this page helpful?
0 / 5 - 0 ratings