How To Change Placeholder Color Of Ion-Select

How To Change Placeholder Color Of Ion-Select

Table of Contents

Open the .Ts File of your page the put this code there. example if you using select in register page then open the register.ts file and paste this code there.

ionViewDidEnter() {

// select placeholder color
const mycolor= document.querySelectorAll('ion-select');
mycolor.forEach((sel2) => {
sel2.shadowRoot.querySelectorAll('.select-placeholder')
.forEach((elem) => {
elem.setAttribute('style', 'color: red;');
});
});

}

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

No data found.