When running Karma to test my Angular4 application, I get this error Found the synthetic property @enterAnimation. Please include either \"BrowserAnimationsModule\" o
Future readers: you can also get this exact error, when you forget to place
animations: [ <yourAnimationMethod()> ]
on your @Component
ts file.
that is if you're using [@yourAnimationMethod]
on the HTML template.
This should work.
1- Import BrowserAnimationsModule in app.module.ts
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
2 - Add to imports in app.module.ts
imports: [
BrowserModule,
FormsModule,
HttpModule,
routing,
Ng2SmartTableModule,
TreeModule,
BrowserAnimationsModule]