Found the synthetic property @enterAnimation. Please include either “BrowserAnimationsModule” or “NoopAnimationsModule” in your application. Angular4

后端 未结 8 1435
生来不讨喜
生来不讨喜 2020-12-30 18:21

When running Karma to test my Angular4 application, I get this error Found the synthetic property @enterAnimation. Please include either \"BrowserAnimationsModule\" o

8条回答
  •  滥情空心
    2020-12-30 18:40

    If you see this error during unit testing then you could import utility module like NoopAnimationsModule into your spec file which mocks the real animation and donot actually animate

    import { NoopAnimationsModule } from '@angular/platform-browser/animations';

提交回复
热议问题