mpalourdio / intl-tel-input-ng Goto Github PK
View Code? Open in Web Editor NEW:telephone: Angular module for intl-tel-input integration (https://github.com/jackocnr/intl-tel-input)
License: MIT License
:telephone: Angular module for intl-tel-input integration (https://github.com/jackocnr/intl-tel-input)
License: MIT License
The end user should be able to change an existing phone number.
Two way binding of the intl-tel-input
should accept input.
When I pass an existing value into the component like this: [(E164PhoneNumber)]="data.mobile"
, the value is never set in the field.
TS:
data = {mobile: '+41791234567'};
HTML:
<intl-tel-input name="mobile" [(E164PhoneNumber)]="data.mobile" required></intl-tel-input>
0.0.7 & 0.1.0
Installing without warning or using the --force attribute
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/intl-tel-input
npm WARN intl-tel-input@"^18.2.1" from the root project
npm install intl-tel-input-ng
current version
Would be awesome to support ReactiveFormsModule.
Otherwise great adaptation!
Hi, im trying to auto detected the countries and its not working.
my code:
<intl-tel-input [name]="'phone'" [cssClass]="'form-control phone'" [labelCssClass]="'col-sm-12'" [required]="true" [options]="{ preferredCountries: [model] }" [onlyLocalized]="true" [(E164PhoneNumber)]="E164PhoneNumber"></intl-tel-input>
component:
default: public model: any = 'uk';
after i call the function its need to be the ip of the country im coming from
sync GetCoontryCode() { await this.phoneService.getCountryCode().subscribe((res) => { const type = res['country'].toLowerCase(); console.log(type); this.model = type; }); }
but its not working and not change the default
angualr 7.2.8
last version
thanks
There is a way to get the country code selected?
Upon following the exact same steps, the plugin should work
The plugin doesn't work
Followed the same steps in the read me, results are here
0.4.0
I was looking a way to display my already existing phone number on input, but I couldn't find anything related to that. I found something in intl-tel-input, but it was with jquery and I didn't know how can I implement it on angular.
So I want to have something like this:
<intl-tel-input [(ngModel)]="myExistingNumber" id="phone"></intl-tel-input>
Is there a way I can display it?
I really need help with it.
Use ng add
to ease module installation, particularly adding required css and js files to angular.json.
See this blog post.
v0.11.0 has introduced isValidNumberPrecise
to check phone number validation.
Maybe we should go back to isValidNumber
as before, so we can be more relaxed regarding keeping the lib up-to-date.
The difference between these 2 methods are in the main lib readme.
When using "intl-tel-input-ng" with Ionic 4, which is forcing TypeScript 4.3.4 (and Angular 8.1.2) I get the following error:
An accessor cannot be declared in an ambient context.
I understood that I would have to update TypeScript to 3.7+ but as I sad, Ionic 4 does not let me (forces TS < 3.5).
Is it possible to change the code in a way, so that it's backwards compatible?
0.1.0
Works fine with 0.7.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.