【问题标题】:Angular 5 Animations are not working on iOS 10.3 SafariAngular 5 动画不适用于 iOS 10.3 Safari
【发布时间】:2022-03-21 20:56:29
【问题描述】:

我在我的页面上使用 @angular/animations。它在 Chrome、Firefox、Safari(Desktop) 上完美运行,但具有动画的 div 在 Safari (iOS) 中不可见。

我在 polyfills.ts 文件中导入了 web-animations-js

**versions**
npm 5.5.1 
@angular/animations: "5.1.1" 
@angular/cli: "1.6.1"
@angular/compiler-cli: "5.1.0" 
web-animations-js: "^2.3.1"

【问题讨论】:

  • 如何在 polyfills.ts 中导入 web-animations-js ?
  • @br.julien import 'web-animations-js';
  • 也试试 import 'web-animations-js/web-animations.min';require('web-animations-js/web-animations. min');
  • @br.julien 我都试过了。没用。
  • 另一个想法是将它放在导入列表的首位,如果它还没有完成的话

标签: angular mobile-safari angular5 angular-animations web-animations


【解决方案1】:

你需要添加 polyfill 在 polyfills.ts 中

中移除 cmets

import web-animations-js;

然后运行

npm install --save web-animations-js

【讨论】:

    猜你喜欢
    • 2015-08-25
    • 1970-01-01
    • 1970-01-01
    • 2023-04-09
    • 2012-05-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多