I have a problem with the placeholder from ion-input. I want to change the placeholder when a checkbox is checked when when nothing is checked to display it again. Some of my code :
placeholderText = "Write something";
<ion-input
name="search"
type="search"
ngModel
[placeholder]="placeholderText"
#searchCtrl="ngModel"
></ion-input>
dummyArray: { name: string; x: string; checked: boolean }[] = [
{
name: "a",
x: "grg",
checked: false,
},
{
name: "b",
phone: "ggg",
checked: false,
},
]. This is a dummy date array of objects.
<ion-list *ngFor="let dummy of dummyArray">
<ion-label> {{dummy.name}}</ion-label>
<ion-checkbox></ion-checkbox>
</ion-list>
What I need is to change the placeholderText if someone is checked from the checkbox to have an empty string placeholder and if no one is checked to display the text.
How can I achieve this , please help
Thanks