I am curious about how to manipulate the properties or attributes of an Ionic component from a TypeScript file.
For example, if I have an input component on my HTML page:
<ion-item>
<ion-input type="text" [(ngModel)]="testText"></ion-input>
</ion-item>
How can I access and modify its specific attributes like max
, min
, placeholder
, or make it readonly
from my TS file? Can we interact with properties through the ngModel value?
Let's say I have a Date component on my page:
<ion-item>
<ion-label>Date</ion-label>
<ion-datetime pickerFormat="MMMM YYYY" [(ngModel)]="myDate"></ion-datetime>
</ion-item>
How can we set its attributes like the Min
date or Max
date from the TS file?