Consider the following form and directive:
form = form(signal({ name: '' }));
@Directive({
selector: "myDirective"
})
export class MyDirective {
#field = inject(Field);
constructor() {
// how to get the field's parent?
}
}
<form>
<input [field]="form.name" myDirective type="text" placeholder="Name" >
</form>
Is it currently possible with signal forms to retrieve the parent of a field? Or do I need to figure out an alternative approach? This is a silly example but I think it demonstrates the problem I am facing.
Thank you for any help!