Hello,
I’m wondering, how it is possible to fill input field with text, in my case retrieved data value from database, which want be into the input field after registration with logged in.
If I got some value from variable: public existName: string;
and input field with placeholders. I can show it with placeholder placeholder="Name {{existName}}"
:
<ion-item>
<ion-input type="text" [(ngModel)]="name" placeholder="Name {{existName}}" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Name'"></ion-input>
</ion-item>
but how to add it inside the input field, for example with page load or event, as editable text, allow user to see exist data in input fields. With using of value={{existName}}
:
<ion-item>
<ion-input value={{existName}} type="text" [(ngModel)]="name" placeholder="Name" onfocus="this.placeholder = ''" onblur="this.placeholder = 'Name'"></ion-input>
</ion-item>
I got error:
Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: ‘model: null’. Current value: ‘model: aghata’.