0

I am using ngx-Modal, and I have a form within the modal.

The problem is, I need to have the modal close after the form is submitted, but I can only submit the form, or close the form, not both.

I have tried using the (onClose)="modalName.close(), in the tag, and having a submit button calling my submit method with a (click)="....", but the modal will not close. I have also tried switching it up to the submit button calling modalName.close(), but then the form is not submitted..

Is there a way to add the .close() method to my submit method in my ts file?

Using Angular5 and typescript, thanks!

J Hogan
  • 117
  • 1
  • 3
  • 9

1 Answers1

0

turns out you can use (onSubmit) multiple times :)

J Hogan
  • 117
  • 1
  • 3
  • 9