I'm using Dynamic Dialog with a component containing a simple form.
I've implemented a form submit on positive action, and a form reset on Cancel action (in a button). Both actions close the dynamic dialog afterward.
But, if I have the form touched and dirty, and click the Close icon in the dynamic dialog, the form reset is never called.
QUESTION: Are there any API handles that can allow me to programmatically call the close action attached to the icon? Can other actions (such as form reset) be attached to the close icon action?
(or, will I need to dig deep in the component's code to come up with a hack?)
Also, I like the animation attached to the close icon action.
QUESTION: Can the this.ref.close() be used with an animation, just like the close icon?
I'm using the following angular versions:
Code: Select all
Angular CLI: 7.3.3
Node: 10.15.1
OS: win32 x64
Angular: 7.2.6
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.13.3
@angular-devkit/build-angular 0.13.3
@angular-devkit/build-optimizer 0.13.3
@angular-devkit/build-webpack 0.13.3
@angular-devkit/core 7.3.3
@angular-devkit/schematics 7.3.3
@angular/cli 7.3.3
@ngtools/webpack 7.3.3
@schematics/angular 7.3.3
@schematics/update 0.13.3
rxjs 6.3.3
typescript 3.2.4
webpack 4.29.0
Many thanks for your attention.