Mitosis react-like textarea syntax does not work in angular
Author: cadamsdevCreated Nov 4, 2022Updated Mar 30, 2025
Labelsbug
I am interested in helping provide a fix!
Yes
Which generators are impacted?
- All
- Angular
- HTML
- Qwik
- React
- React-Native
- Solid
- Stencil
- Svelte
- Vue
- Web components
Reproduction case
Expected Behaviour
When using the react-like syntax to set the value of a textarea e.g
<textarea value='test' />Mitosis converts this into the following angular code
<textarea value="test"></textarea>Instead mitosis should convert this into one of the following syntaxes which works in angular.
<textarea [value]="'test'"></textarea>
<textarea [(ngModel)]="name"></textarea>Actual Behaviour
<textarea value="test"></textarea>does not show "test" inside the textarea in angular.
Additional Information
See stackblitz https://stackblitz.com/edit/angular-ivy-zar36q?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts
Source: BuilderIO/mitosis