Skip to content

Commit bd5997c

Browse files
zakaria-balithePunderWoman
authored andcommitted
docs(forms): make onSubmit method async for form submission
Change onSubmit method to be asynchronous since we are using await inside it
1 parent 8fad615 commit bd5997c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • adev/src/content/guide/forms/signals

adev/src/content/guide/forms/signals/models.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ You can access form values in two ways: directly from the model signal, or throu
117117
Access the model signal when you need the complete form data, such as during form submission:
118118

119119
```ts
120-
onSubmit() {
120+
async onSubmit() {
121121
const formData = this.loginModel();
122122
console.log(formData.email, formData.password);
123123

0 commit comments

Comments
 (0)