I have used angular material version: 5.2.1
And wanted to know how to disable their animations, especially the matDialog.
I have tried @.disabled but no luck.
I have used angular material version: 5.2.1
And wanted to know how to disable their animations, especially the matDialog.
I have tried @.disabled but no luck.
The approved answer does not work and is not consistent with Angular docs, at least since Angular 6. To disable animations in Angular 6 to 13, from the official doc, use:
// In app.component.ts
import { Component, HostBinding } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
})
export class AppComponent {
@HostBinding('@.disabled')
public animationsDisabled = true; // Set to true to disable animations
}
This is useful for end-to-end (E2E) testing.
You can use
NoopAnimationsModule
by angular materialOr if you want to remove transition on some specific components you can do it via CSS like this