首页 > 解决方案 > Animate.css 动画 fadeInDown 在添加 @angular/material 后停止工作

问题描述

我最近在我的 Angular 项目中添加了 Angular 材质,但是在我的项目中添加了 @angular/material 后不久,animate.js 提供的一些动画就停止了工作。

有什么方法可以让 animate.js 和 angular material 一起工作。

控制台错误:

Module build failed: Error: ENOENT: no such file or directory, open 'node_modules/zone.js/dist/zone-evergreen.js'

但我确实在那个路径上有那个文件。

标签: javascriptangularangular-materialanimate.css

解决方案


我认为这会有所帮助:(为了在冲突区域禁用角度材质动画)

-NoopAnimationsModule改为BrowserAnimationsModule禁用所有动画

-@HostBinding('@.disabled') private disabled = true;用于禁用组件动画

-<mat-checkbox @.disabled></mat-checkbox>用于禁用材质组件(使用指令)


推荐阅读