Angular 8Angular 9Javascript

Solved – intlTelInput is not a function

Angular 8 input phone number with country code
Views

Hello to all, welcome to therichpost.com. In this post, I will solved – intlTelInput is not a function.

From last couple of months, I am getting questions from my blog and youtube viewers that, during implement input phone number with country code, they are facing many error like below:

  • window.intlTelInput is not a function
  • intlTelInput is not a function
  • ERROR TypeError: ctx.telInputObject is not a function

Here is the proper tutorial to add input type phone number into your angular 9 application but you need to replace the component.html file with my code and that code I have mentioned in the end:

1. Here is the code, you just need to replace:

<input  type="text" ng2TelInput (hasError)="hasError($event)" (ng2TelOutput)="getNumber($event)" (intlTelInputObject)="telInputObject($event)" 
 (countryChange)="onCountryChange($event)" />





//You need to remove all the functions because first you have to declare them all in component.ts file
----To---- //For using default events you just need to declare functions into your component.ts file as well






<input  type="text" ng2TelInput  />

If you are still facing issue then please comment below.

jassa

Thank you

Ajay Malhotra
the authorAjay Malhotra
Hello to all. Welcome to therichpost.com. Myself Ajay Malhotra and I am freelance full stack developer. I love coding. I know Wordpress, Core php, Angularjs, Angular 2, Angular 6, Angular 7, Angular 8, Angular 9, Nodejs, laravel, Codeigniter, Shopify, Squarespace, Jquery, Google Map Api, Vuejs, Reactjs, Bigcommerce etc.

24 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Positive SSL