[Angular] Improve template integration #1516
Replies: 2 comments 5 replies
-
Hi! Reducing boilerplate is one of the ongoing projects at this time. React already has an implementation using If you want to contribute for the Angular implementation, I'm sure your effort will be greatly appreciated! As someone who has never programmed with Angular, I can't give proper feedback for your suggestion. However, I can give you reference points to consider for the Angular implementation based on what the React version did:
The entire AppForm lives inside the React adapter. There are no form core changes as of v1.11.2 . The directive sounds like an interesting approach. If you think it combines flexibility with reducing boilerplate, it is definitely worth looking into. |
Beta Was this translation helpful? Give feedback.
-
Hey @flensrocker, glad to see you here! I'd love to give some thoughts on your proposed API design, as well as the three major options I investigated for our Angular adapter. Concerns on your proposalPer our philosophy doc, I see two major problems with the proposed API:
As such - despite good intentions and a good idea broadly - I'm not sure this specific API suites our needs. Other explored optionsAs mentioned earlier, we explored many alternative APIs to make this work the way we think would be ideal with our engineering philosophy. 1a) Alternative
|
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm new to TanStack Form and just started playing around with it. I use Angular as my framework.
It seems there is "a lot of" boilerplate needed in the template to connect a field to an input.
Is it correct to assume, that this is (almost) always needed?
If so, Angular supports handling this with a directive, for example
Usage would then be:
And it would use the
TanStackField
of theng-container
(from the "Quick Start" example).If there's interest in developing the integration of TanStack Form in Angular in a more "Angular way" (maybe like the
FormGroupDirective
,FormControlNameDirective
style), I can try to do some research in this direction.My goal is to have the least amount of "code" inside the template.
BTW: the class is called
TanStackField
, but its selector[tanstackField]
(lowercase "s"). Is this on purpose? Or would be[tanStackField]
a better selector? (it can be[tanstackField], [tanStackField]
for compatibility)Beta Was this translation helpful? Give feedback.
All reactions