Junaid Ahmed
Mindful Coder

Follow

Mindful Coder

Follow

Change ion-input value programmatically

Junaid Ahmed's photo
Junaid Ahmed
·Aug 16, 2018·

1 min read

Play this article

@ViewChild('googlePlace') googlePlace;

Define in template variable like this

<ion-input #googlePlace class="rounded-inp single-inp" type="text" placeholder="Location"></ion-input>

//set values like this;
this
.googlePlace._native.nativeElement.value \= '';
this.googlePlace.value \= '';

 
Share this