我已经通过npm将'css-animator'安装到我的项目中
npm install css-animator --save
我还在index.html页面中添加了以下行
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
现在,当我尝试在应用程序模块中导入AnimationService或AnimatesDirective时,按
import { AnimationService, AnimatesDirective } from 'css-animator';
但我得到 错误,说找不到'css-animator'模块。
中提到的步骤进行操作答案 0 :(得分:0)
将以下代码添加到app.module.ts声明和提供者部分:
import { AnimationService, AnimatesDirective } from 'css-animator';
...
...
declarations: [
...
AnimatesDirective
]
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler},
AnimationService
]