Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49526

InvalidValueError: not an instance of HTMLInputElement ionic 4

$
0
0

@youssefff wrote:

want to use the ionic input with google map but it gives me an error :

InvalidValueError: not an instance of HTMLInputElement

Here’s the code :

HTML:

<ion-item>
  <ion-label position="floating">Destination</ion-label>
  <ion-input #autoCompleteInputDestination formControlName="destination"></ion-input>
</ion-item>

ts file :

@ViewChild('autoCompleteInputDestination', {static: true}) inputNativeElementd: any;
// distination
const autocomplete2 = new google.maps.places.Autocomplete(this.inputNativeElementd.nativeElement as HTMLInputElement);
autocomplete2.addListener('place_changed', () => {
    //some code
 }

Any suggestions for this problem?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49526

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>