The Angular 2 animations documentation refers to the Web Animations API polyfill for browsers that don't support the native one.
What's the proper way to add this polyfill to an Angular 2 project created with Angular CLI?
(I am using angular-cli: 1.0.0-beta.10)
With no luck, I have tried the ideas and solutions mentioned here:
I downloaded it via NPM and added it to system-config.ts
. I believe this is along the lines of what's recommended but the polyfill doesn't get loaded (I can tell because the animations don't work in Safari).
I only got this to work by including the polyfill in index.html
, which I know it's not the proper way:
<script src="https://rawgit.com/web-animations/web-animations-js/master/web-animations.min.js"></script>
I will add here any details that may help clarify my question, but if you need to see the code, I have it on Github:
https://github.com/cmermingas/connect-four
Thanks in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…