Found the synthetic property @enterAnimation. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application. Angular4
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.
I found the solution. I just needed to import in app.component.spec.ts
the same import
// animation module
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
...
@NgModule({
imports: [...
BrowserAnimationsModule,
...
],
For my Angular 6 application, I resolved the issue by adding the following to my component .spec.ts file:
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
Then add the BrowserAnimationsModule
to the imports of the TestBed.configureTestingModule
in the same component .spec.ts file
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ LinkedSitesComponent ], imports: [ BrowserAnimationsModule ],
})
.compileComponents();
}));