0
votes

https://stackblitz.com/github/snehalp29/ng10-material10

I am trying to use the material side nav but getting the following issue.

preview-29b0f46fcc27b310236ab.js:1 ERROR Error: Uncaught (in promise): Error: Found the synthetic listener @transform.start. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application. Error: Found the synthetic listener @transform.start. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.

below is the code

<mat-sidenav-container class="example-container">
  <mat-sidenav mode="side" opened>
    Sidenav content
    <app-toolbar></app-toolbar>
  </mat-sidenav>
  <mat-sidenav-content
    >Main content
    <router-outlet></router-outlet>
  </mat-sidenav-content>
</mat-sidenav-container>

1
So.. did you add those modules..? - MikeOne
Yes I have added those modules - Snehal P
I don’t see it in your ContactManagerModule..? - MikeOne

1 Answers

0
votes

the error thrown is telling us that you must include the module "BrowserAnimationsModule" or "NoopAnimationsModule" in your module.

If you module is AppModule, you have to include the import required by Angular Material, for example:

@NgModule({
  declarations: [...],
  imports: [
    others imports here...,
    BrowserAnimationsModule <---- the import required!
  ]
})

Try it