the angular 2 animations documentation refers web animations api polyfill browsers don't support native one.
what's proper way add polyfill angular 2 project created angular cli?
(i using angular-cli: 1.0.0-beta.10)
with no luck, have tried ideas , solutions mentioned here:
- https://github.com/angular/angular-cli/issues/949
- https://github.com/angular/angular-cli/issues/1015
- https://github.com/angular/angular-cli/issues/718#issuecomment-225493863
i downloaded via npm , added system-config.ts
. believe along lines of what's recommended polyfill doesn't loaded (i can tell because animations don't work in safari).
i got work including polyfill in index.html
, know it's not proper way:
<script src="https://rawgit.com/web-animations/web-animations-js/master/web-animations.min.js"></script>
i add here details may clarify question, if need see code, have on github:
https://github.com/cmermingas/connect-four
thanks in advance!
adding polyfill newer, webpack version of angular cli easier:
install
npm install web-animations-js --save
add
polyfills.ts
:require('web-animations-js/web-animations.min');
it worked if import 'web-animations-js/web-animations.min';
Comments
Post a Comment