Coder Social home page Coder Social logo

mpalourdio / intl-tel-input-ng Goto Github PK

View Code? Open in Web Editor NEW
16.0 5.0 6.0 3.19 MB

:telephone: Angular module for intl-tel-input integration (https://github.com/jackocnr/intl-tel-input)

License: MIT License

JavaScript 8.26% TypeScript 90.01% HTML 1.73%
intl-tel-input phone-number lib-phone-number e164 angular angular2

intl-tel-input-ng's People

Contributors

dependabot[bot] avatar mpalourdio avatar nabilelmahiri avatar tlebreton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

intl-tel-input-ng's Issues

Two way binding of phone number is one way only

Expected behavior

The end user should be able to change an existing phone number.
Two way binding of the intl-tel-input should accept input.

Actual behavior

When I pass an existing value into the component like this: [(E164PhoneNumber)]="data.mobile", the value is never set in the field.

Steps to reproduce

TS:
data = {mobile: '+41791234567'};
HTML:
<intl-tel-input name="mobile" [(E164PhoneNumber)]="data.mobile" required></intl-tel-input>

intl-tel-input-ng version

0.0.7 & 0.1.0

how i can use https://ipinfo.io

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

intl-tel-input-ng version

last version

thanks

The steps doesn't work

Expected behavior

Upon following the exact same steps, the plugin should work

Actual behavior

The plugin doesn't work

Steps to reproduce

Followed the same steps in the read me, results are here

intl-tel-input-ng version

0.4.0

Display existing number

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.

[feature] ng add

Use ng add to ease module installation, particularly adding required css and js files to angular.json.

See this blog post.

isValidNumberPrecise vs isValidNumber

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.

TypeScript backwards compatibility not given

Actual behavior

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?

intl-tel-input-ng version

0.1.0
Works fine with 0.7.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.