0

The Angular Material spinner that i have implemented has got an animation out which makes it go down before vanishing. Is there a way to unable this animation? This is the code: I tried with the keyframes but it doesn't work.

<mat-spinner style="margin: auto; margin-top: 10%"></mat-spinner>

  @keyframes slideDown {
    0% {}
    100% {
        transform: translateY(20%);
    }
}

.cdk-overlay-pane {
    transform: translateY(-250%);
    animation: slideDown 0.5s forwards 0s ease-in;
}

.cdk-overlay-container>* {
    transition: none;
}
talhature
  • 2,246
  • 1
  • 14
  • 28

1 Answers1

1

Add "BrowserAnimationsModule" in your @NgModule imports array, and remove "NoopAnimationsModule" if you have it there.

@NgModule({
declarations: [..],
imports: [
    ..
    BrowserAnimationsModule,
    ..
]
})
Akshay Rana
  • 1,455
  • 11
  • 20