Pentiado / angular-lazy-img

Lightweight lazy load images plugin. Only 1kb after gziping. Pure JavaScript, only Angular as dependency.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not working without ng-repeat

MrCalamitus opened this issue · comments

Code:

<div class="ot-panel-block"> <div class="post-image"> <img style="position:absolute;top:10px;right:10px;" lazy-img='{{restaurante.logo}}' alt="logo {{restaurante.name}}" /> <img lazy-img='{{restaurante.photo1}}' src="images/restaurante/principal.png" alt="" /> </div> </div>

Only apply lazyload in last img

add ng-if="true" to your img tag. not the nice way, better would be a scope:true in return of the angular lazyImg directive

Thaks for you response.

I inserted the image in object and applyed a ng-repeat and with those it works. It seems that only works with ng-repeat.