-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Safari animations problems in an angular app #914
Comments
It might be related to the "base" tag that angular uses. |
Thanks! I understand the problem and solved using angular's HashLocationStrategy. |
Wow I spent ALL day on this. Can you expand the explanation in the docs and samples. This is very important, and extremely hard to debug. Also what's written above is confusing and implies you pass in your base path - which in my Angular app is actually Anyway this fixed it for me for Angular 6 app:
Hate to see someone else waste as much time as I did - it's very puzzling what is happening until you know - and many opportunities to make a wrong assumption. |
When we use HashLocationStrategy, a "#" will be added after your domain. The server will consider only http://localhost:4200, everthing after "#" will be ignored, so the lottie animation will always look for the SVGs considering the base url. For use this, in your app.module.ts import and add to providers:
More explanation: Hope it helps. |
This is very unexpected... SVG animation, angular, |
I have this in my component.html
this in my component.ts
Works fine in Chrome and Firefox but does not work for Safari. |
@bodymovin Could add this hack to Lottie Web FAQ? :) |
Hi,
I'm facing problems with lottie, angular and Safari.
I have an angular (angular 5) app with many components (routes). On each component there is a Lottie animation.
The initial route with animations works, slowly, but works. When i go to another route, the animation works but without the svgs, i can see the masks transitions of the animations, but it is like the SVGs can't be loaded.
It happens only on Safari. Chrome, firefox and even on the Internet Explorer works well.
Someone faced something like this?
Thanks in advance!
The text was updated successfully, but these errors were encountered: