Open timdoes opened 7 years ago
Also, running ng build --prod --aot
for Ahead-of-Time compilation throws this error:
ERROR in /node_modules/lottie-angular2/dist/esm/src/lottieAnimationView.component.ngfactory.ts (1,1): Property 'viewWidth' is private and only accessible within class 'LottieAnimationViewComponent'.
/node_modules/lottie-angular2/dist/esm/src/lottieAnimationView.component.ngfactory.ts (1,1): Property 'viewHeight' is private and only accessible within class 'LottieAnimationViewComponent'.
on the following:
@angular/cli: 1.0.0
node: 7.7.4
os: darwin x64
@angular/animations: 4.0.0
@angular/common: 4.0.0
@angular/compiler: 4.0.0
@angular/core: 4.0.0
@angular/forms: 4.0.0
@angular/http: 4.0.0
@angular/material: 2.0.0-beta.2
@angular/platform-browser: 4.0.0
@angular/platform-browser-dynamic: 4.0.0
@angular/router: 4.0.0
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.0
@angular/language-service: 4.0.0
@angular/service-worker: 1.0.0-beta.8
I can open up a separate issue for that if you'd like :)
I think it's different issue.. I haven't test it on angular4 yet
After some research, I found out that private variables do not work in templates with AOT builds as they exist outside the component class. See here
Let me know if you would like to support AOT builds and I can create a PR either making viewHeight
and viewWidth
public (don't see the harm) or creating a getter for the values in the template :)
Thanks for your investigation.
Please feel free to PR it. I'll merge and patch it as 0.0.7
We are still not able to see the animation in IOS. When we navigate the animation disappears.
I am able to see/play/load the animations on all major browsers and devices except for any browser on the iPhone iOS version above.
Is this something anyone else is experiencing?