betsol / ng-intl-tel-input Goto Github PK
View Code? Open in Web Editor NEWintl-tel-input integration for Angular.js
intl-tel-input integration for Angular.js
I receive the following error when using the directive:
Expression 'undefined' used with directive 'intlTelInput' is non-assignable!
Following this document, it seems the issue is in the scope properties:
scope: {
intlTelInputOptions: '=',
intlTelInputController: '='
}
Making the binding optional fixes the error:
scope: {
intlTelInputOptions: '=?',
intlTelInputController: '=?'
}
Can you confirm that this is a viable solution? If I can configure the module globally, It makes sense to make them optional.
Hi there !
Is there a way to use your directive as a filter to display formated phone number in paragraph for example:
<p>{{phone | phone}}</p>
?
Everything working fine, but have this error.
''Cannot set property 'phoneNumber' of undefined''
Hello,
thank you very much for your directive, it works fine and it very easy to use.
I use many options in my case (nationalMode, allowDropdown, placeholderNumberType...) and it's awesome.
However, I need to customize the placeholder of my field and I don't know how to use the customPlaceholder option ?!
In the library intl-tel-input, he says that's a function...
customPlaceholder: function(selectedCountryPlaceholder, selectedCountryData) { return "e.g. " + selectedCountryPlaceholder; }
Could you tell me if it's possible to use it with your angularjs directive ?
Thanks in advance
Series start with 6 showing not valid i.e. 637808XXXX
The current version of intl-tel-input (7.1.1) seems to be broken when using certain configurations. I noticed that you recently downgraded to this version from 8.4.6 (current release).
Any reason for this change?
I'm in the process of migrating to webpack from a Grunt build system that simply places this library along with its dependencies (jQuery, intl-tel-input, utils.js) into a concatenated JS file and then loads it on the page with a <script>
tag. Since I'm trying to use the path of least resistance during this migration, I've decided to use the script-loader
which loads JS files as if they were loaded via a <script>
tag.
I can verify that jQuery
, intl-tel-input
plugin, utils.js
and the ng-intl-tel-input
module have all loaded on the page, but when the ng-intl-tel-input
directive tries to initialize in the link
function, I keep getting the error ng-intl-tel-input: intl-tel-input jQuery plugin must be loaded, skipping directive initialization
.
Here is the relevant portion of my app.js
entry file that loads the aforementioned scripts:
require("script!../../node_modules/jquery/dist/jquery.js");
...
require("script!../../node_modules/intl-tel-input/build/js/intlTelInput.js");
require("script!../../node_modules/intl-tel-input/build/js/utils.js");
...
require("betsol-ng-intl-tel-input");
...
angular.module("app", ["betsol.intlTelInput"]);
Has anyone else successfully implemented this module using a webpack build system? I know these files work because I can manually load them on the page with <script>
tags and the directive functions correctly.
for example '8919153888' is valid number in india. But it is treating as invalid number
intl-tel-input is now at 9.0.7. Any chance on getting this updated to work with v9?
Hi, could you please create a webjar for this project? https://www.webjars.org/. Thanks.
I noticed the following when testing your demo:
Using the 2nd Set to button of +79031234567 ext. 123, the show National Number button alerts this: "8 (903) 123-45-67 ext. 123" Dont know where the first 8 is coming from? Even more interesting since the first sample number +380441234567 returns "044 123 4567"
Hi!
It would be nice to have a shortcut to watch some model or set default country using scope variable like
intl-tel-input-country="some_scope_variable". I found it hard to set country based on another select or data resolved somewhere else.
Hi,
I've got an issue with $element.intlTelInput('getNumber') which return an empty string instead of my model.
Working, while adding $timeout to the method getModelValue()
function getModelValue () {
$timeout(function() {
return $element.intlTelInput('getNumber');
});
}
Installation error on bower file
In bower.json
the following path causes an instantiation error:
"main": "dist/betsol-ng-intl-tel-input.js"
I'm using gulp inject to automatically populate any bower script dependencies. It seems that the above line doesn't work unless I point it to the scripts directory within dist, like so:
``"main": "dist/scripts/betsol-ng-intl-tel-input.js"`
Have you ever had any issues regarding this?
betsol/ng-intl-tel-input cannot be used with jQuery v3 and later.
Some functions in dependency intl-tel-input v7.1.1 - 8* are not compatible with jQuery version 3 and above. This is because the original intl-tel-input library uses deprecated function $(window).load(function() { ... });
in versions v7.1.1 - 8* instead of its newer counterpart, $(window).on('load', function() { ... });
This has been fixed in v9 ^ of intl-tel-input.
If permitting, updating the bower.json file for betsol/ng-intl-tel-input to specify v9 intl-tel-input would solve this problem.
I have installed plugin by cloning it from git Jacknor
after that i was installing it with "bower install --save betsol-ng-intl-tel-input" i am getting error as "prefix the choice with ! to persist it to bower.json"
Hi all,
I need to make an input with country codes to choose default country code for user customization.
Anybody knows how can I do that with this plugin?
I have created directive in custom componenet and used this ng-intl-tel-input directive in that
and using my custom directive in test page is ok, but in my ionic app with angular it is giving
Error: $compile:multidir Multiple Directive Resource Contention
with below details
Multiple directives [input (module: myionicapp), intlTelInput] asking for new/isolated scope on:
I'm using this module inside an ng-if condition.
I have used ng-model="model.phoneNumber", I still get an undefined as value.
Also when I set the intl-tel-input-controller="myIntlTelInputCtrl" and in controller I have $scope.myIntlTelInputCtrl; I get "getNumber()" of undefined as the API is not getting initialised.
However, intl-tel-input-options="{ onlyCountries: ['us', 'in'] }" is working.
Hello,
I am getting this in the console :
ng-intl-tel-input: intl-tel-input jQuery plugin must be loaded, skipping directive initialization
What can be causing this?
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.