GithubHelp home page GithubHelp logo

ng-intl-tel-input's People

Contributors

jordandotme avatar yiuminghuynh avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

ng-intl-tel-input's Issues

Non-Assignable error in directive

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.

display as filter ?

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>

?

How to use the option "customPlaceholder" ?

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

Webpack build not working

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.

Update to v9?

intl-tel-input is now at 9.0.7. Any chance on getting this updated to work with v9?

Demo not working correctly?

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"

feature request: watching country from somewhere

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.

getNumber return empty string

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');
            });
          }

Failed to instantiate module due to main path in 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?

Library not compatible with jQuery v3 ^

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.

Get countries list for select input

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?

Error: $compile:multidir Multiple Directive Resource Contention

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:

ng-Model not populating the value

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.

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.