Daugilas / lazyYT

A jQuery plugin to lazy load those dang Youtube iframe videos.
Other
56 stars 14 forks source link

Not compatible with angular #16

Open kunchamharsha opened 6 years ago

kunchamharsha commented 6 years ago

I have a client rendering page where we render the page dynamically using angularjs, lazyYT is rendering it even before angular renders it. Can anyone help me with this?

Daugilas commented 6 years ago

@kunchamharsha lazyYT is initiated with this line: $('.js-lazyYT').lazyYT({PARAMS}). Don't call it onLoad or on window ready, etc. (as given in demos).

Render Angular and then, once your video containers are ready - call: $('.js-lazyYT').lazyYT({PARAMS})