Angular: How to use with file input #679
-
Is it possible to integrate with the file input? I tried something like this
But i'm getting the following error on load
When i select a file ( Is it possible to get both the filename and the data(uint8Array or something else) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
It should be possible to do a one-way binding from the To do this, you'll want to use |
Beta Was this translation helpful? Give feedback.
-
Im having the same issue and chanching the handleChange is not a solution for me. @alator21 Did you modify anything else besides the handleChange? |
Beta Was this translation helpful? Give feedback.
-
Hi @GonzaloManoukian , I just checked that piece of code, and the solution that I posted above was working exactly like this. No other changes that I am aware of. |
Beta Was this translation helpful? Give feedback.
It should be possible to do a one-way binding from the
HTMLInput
to TanStack Form, but not the other way around (DOM limitation).To do this, you'll want to use
handleChange($any($event).files)
rather thantarget.value