Skip to content

Instantly share code, notes, and snippets.

@teomanofficial
Created October 25, 2023 18:22
Show Gist options
  • Save teomanofficial/40e3d5e60deec6359de44e4e52c9a07a to your computer and use it in GitHub Desktop.
Save teomanofficial/40e3d5e60deec6359de44e4e52c9a07a to your computer and use it in GitHub Desktop.
On User Form Submit
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