I'm trying to create the dialog but problem is I want to disable the animation in the dialog so how to disable it.
相关问题
- Angular RxJS mergeMap types
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- How to update placeholder text in ng2-smart-table?
- How to instantiate Http service in main.ts manuall
- Angular: ngc or tsc?
相关文章
- angular脚手架在ie9+下兼容问题
- angular 前端项目 build 报错 "Cannot find module 'le
- Angular Material Stepper causes mat-formfield to v
- After upgrade to Angular 9 cannot find variable in
- is there any difference between import { Observabl
- Suppress “Circular dependency detected” suppress w
- How can you get current positional information abo
- Angular material table not showing data
you can disable by importing
more info https://material.angular.io/guide/getting-started
In case you want to keep your animations on your app but being able to disable the one attached to a dialog you can override the dialog container by one you can control and disable all the animations inside that container.
Override OverlayContainer component
Create a custom OverlayContainer which extends the one from the cdk
Override the cdk OverlayContainer by the custom one on the app module providers
Replace the dialog wrapper
Get access to the new dialog container and replace the default one
Disable animations
Add the
[@.disabled]
binding to your container in order to disable all the animations happening inside it. https://angular.io/api/animations/trigger#disable-animationsAngular Material 7 has a much nicer animation.
It should alleviate the problem for most developers wanting to disable it.
It opens from the center, zooming in slightly and without sliding up or down. On close it disappears instantly. It also behaves nicely on phones where the bottom toolbar is initially hidden.
It should perform much better on less capable graphics cards, older phones or dialogs with complex content.