Categories

Friday, November 22, 2024
#919814419350 therichposts@gmail.com
Angular 8Angular 9Javascript

Solved – intlTelInput is not a function

Angular 8 input phone number with country code

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

therichpost
the authortherichpost
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 19, MedusaJs, Next.js, Bootstrap 5, Nodejs, Laravel, Codeigniter, Shopify, Squarespace, jQuery, Google Map Api, Vuejs, Reactjs, Big commerce etc.

46 Comments

Leave a Reply

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