airfranceklm / ng-lazy-image

Angular directive for loading responsive image when container (which is preventing reflow) is in viewport.
http://afklm.github.io/ng-lazy-image/
MIT License
351 stars 64 forks source link

when it is in ng-bind-html it #66

Closed ebrahim-tadbir closed 7 years ago

ebrahim-tadbir commented 7 years ago

Hi i load the content as following: <div ng-bind-html="vm.data.full_content"></div>

and then in the controller I have vm.data.full_content=$sce.trustAsHtml(data.data.full_content);

and vm.data.full_content is as

<p>some text</p><div afkl-lazy-image="path-to/image.jpg" ></div>

IT IS NOT WORKING FOR ME!

SquadraCorse commented 7 years ago

This is angular specific. Just recompile it. You can add a recompile directive to the binding container! See http://stackoverflow.com/questions/17417607/angular-ng-bind-html-and-directive-within-it

2016-11-14 9:04 GMT+01:00 ebrahim-tadbir notifications@github.com:

Hi i load the content as following:

and then in the controller I have vm.data.full_content=$sce.trustAsHtml(data.data.full_content);

and vm.data.full_content is as

some text

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/afklm/ng-lazy-image/issues/66, or mute the thread https://github.com/notifications/unsubscribe-auth/AFk1tMgnaeAWwLDhAr_btuIyvcuDYn7Kks5q-BYkgaJpZM4KxC_Q .