chenqingspring / ng-lottie

Render After Effects animations on Angular based on lottie-web
MIT License
340 stars 100 forks source link

json source data instead of path #17

Open valentinbdv opened 6 years ago

valentinbdv commented 6 years ago

Hi,

I am not sure if this is possible but let me explain my problem : We have more and more lottie animations in our application which make a lot of http requests and slow down the loading time.

I was wondering if we could put the lottie data.json as a source instead of a path. Thus we could merge all our lottie's json files to have only one http request then split it to distribute it correctly in each animation.

Thanks!

hamdiwanis commented 6 years ago

Hello, you can use animationData property on the option object instead of path :)

valentinbdv commented 6 years ago

Yes, actually I test it yesterday and it works just fine! Thanks

ElAndy94 commented 5 years ago

Thank you, this also solved my problem.