This concept is about user profile. I want to assign a value(userData.email_id) coming from api using [value] attribute of input and upon changes i want to get data back to TS using ngModel into email_id property.
Here i am failing to assign value to input using [value]. Suggest me the solution.
Note: Here userData.email_id is coming from server.
TS:
email_id: string;
html:
<mat-form-field>
<input
type="text"
placeholder="Email"
matInput
[(ngModel)]="email_id"
[value]="userData.email_id"
name="uEmail"
/>
</mat-form-field>
[value]and set the value ofemail_idasuserData.email_id