docs(forms): correct signal field access in form model example

The `myForm` field is a callable `FieldTree`, so its value must be read
via `this.myForm().value()`. Fixes two examples that incorrectly used
`this.myForm.value()`.
This commit is contained in:
aparziale
2026-06-24 17:24:24 +02:00
committed by Alex Rickabaugh
parent 165995285c
commit e653a7bf30
@@ -380,7 +380,7 @@ class MyForm {
handleSubmit() {
submit(this.myForm, async () => {
await this.myDataService.update(formModelToDomainModel(this.myForm.value()));
await this.myDataService.update(formModelToDomainModel(this.myForm().value()));
});
};
}
@@ -402,7 +402,7 @@ class MyForm {
effect(() => {
// When the form model changes to a valid value, update the domain model.
if (this.myForm().valid()) {
this.domainModel.set(formModelToDomainModel(this.myForm.value()));
this.domainModel.set(formModelToDomainModel(this.myForm().value()));
}
});
};