chenqingspring / ng-lottie

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

Throwing Error Message in Console after Angular 9 Upgrade #74

Open Sakthisivaprakash opened 4 years ago

Sakthisivaprakash commented 4 years ago

ERROR TypeError: Cannot read property 'nativeElement' of undefined at LottieAnimationViewComponent.push../node_modules/ng-lottie/__ivy_ngcc__/dist/esm/src/lottieAnimationView.component.js.LottieAnimationViewComponent.ngOnInit (lottieAnimationView.component.js:19) at callHook (core.js:3937) at callHooks (core.js:3901) at executeInitAndCheckHooks (core.js:3842) at selectIndexInternal (core.js:9602) at Module.ɵɵadvance (core.js:9563) at HomeComponent_Template (home.component.html:349) at executeTemplate (core.js:11930) at refreshView (core.js:11777) at refreshComponent (core.js:13217) defaultErrorLogger @ core.js:5873 handleError @ core.js:5926 (anonymous) @ core.js:42349 invoke @ zone-evergreen.js:365 run @ zone-evergreen.js:124 runOutsideAngular @ core.js:40746 tick @ core.js:42346 (anonymous) @ core.js:42186 invoke @ zone-evergreen.js:365 onInvoke @ core.js:40910 invoke @ zone-evergreen.js:364 run @ zone-evergreen.js:124 run @ core.js:40685 next @ core.js:42183 schedulerFn @ core.js:36512 __tryOrUnsub @ Subscriber.js:183 next @ Subscriber.js:122 _next @ Subscriber.js:72 next @ Subscriber.js:49 next @ Subject.js:39 emit @ core.js:36474 checkStable @ core.js:40824 onHasTask @ core.js:40931 hasTask @ zone-evergreen.js:420 _updateTaskCount @ zone-evergreen.js:441 _updateTaskCount @ zone-evergreen.js:264 runTask @ zone-evergreen.js:185 drainMicroTaskQueue @ zone-evergreen.js:570 invokeTask @ zone-evergreen.js:485 invokeTask @ zone-evergreen.js:1596 globalZoneAwareCallback @ zone-evergreen.js:1622

Sakthisivaprakash commented 4 years ago

@Sakthisivaprakash

This package seems to be abandoned 2 years ago. You can try this as an alternative if you wish to, it supports Angular 9.

@arturovt Yes, I got this as an alternate solution after my investigation through day i posted this issue..Thank you...