How can I animate Angular Material 2 dialog?

How can I animate Angular Material 2 dialog?

I tried using the usual Angular 2+ animation theory. it works, but what happens is that the items in the dialog are expecting (as expected) and the dialog just stays on. But I want the dialog to animate, for example the opacity should go from 1 to 0 in a couple of seconds.

I also checked if the method has MdDialog.close()

any options for animation, but nothing works.

Animating the opacity of the dialog from 1 to 0 (before closing it for example) is a common use case, how can I achieve this with Angular Material 2 dialog?

+4


source to share


3 answers


The dialog should be animated by default as shown here . Have you included BrowserAnimationsModule

in your application?



0


source


This feature is not yet available. You can track the status here .



0


source


You can see what I did here or install the module .

0


source







All Articles