Created
October 25, 2023 18:22
-
-
Save teomanofficial/40e3d5e60deec6359de44e4e52c9a07a to your computer and use it in GitHub Desktop.
On User Form Submit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onFormSubmit($event: any, userForm: NgForm) { | |
if (userForm.invalid) { | |
this.showValidationMessage = true; | |
return; | |
} | |
const request = userForm.value as CreateUserRequest; | |
this.userService.createNewUser(request) | |
.subscribe(...); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment