Reputation: 571
<ion-input placeholder="please input" clearInput></ion-input>
I want to change placeholder's color,and should not affect other pages.
Upvotes: 4
Views: 11995
Reputation: 1905
Though the answer by 99tharun works, current ionic (ionic-angular 3.8.0) offers the standard way of doing it via theme viariables.
See ionic documentation for the input field page, SASS variables section. Notice $text-input-placeholder-color
variable.
Upvotes: 1
Reputation: 1216
Give a class name for ion-input:
<ion-input class="text-input" placeholder="please input" clearInput></ion-input>
And add the following lines to your page's .scss file:
.text-input::-moz-placeholder {
color: red;
}
.text-input:-ms-input-placeholder {
color: red;
}
.text-input::-webkit-input-placeholder {
color: red;
}
Upvotes: 13