There’s isActive
property for ion-icon
, I’d like to change it in ts code, here’s what I tried
# in template
<ion-icon #myIcon name="home"></ion-icon>
# in component
@ViewChild("myIcon") myIcon;
...
onClick() {
myIcon.isActive = true;
}
however it doesn’t work. I know I can bind a variable to isActive
property, but I still want to know how to change view property in ts code.