libphonenumber javascript with angular.js

2,186 views
Skip to first unread message

Thomas Waldecker

unread,
Jan 29, 2014, 11:38:44 AM1/29/14
to libphonenum...@googlegroups.com
Hi list,

I was looking for a phonenumber formatting library for my webapplication based on ASP.NET C# and angular.js.

The size and the memory consumption of the libphonenumber javascript library seems very high.

Is there a way to only use the core of the libphonenumber library without the asyoutypeformatter and the closure library for example?

Do you have some directions to me?

I found a few projects which are based on libphonenumber:

seems a bit hacky, uses the closure library, compiles to a single js file.

uses only the PhoneNumberMetadata.xml which is converted using a pyhton script.
some Numbers are formatted differently to phoneformat and libphonenumber.

Thanks in advance!
Thomas Waldecker

Thomas Waldecker

unread,
Jan 29, 2014, 12:14:08 PM1/29/14
to libphonenum...@googlegroups.com
I created prototypes in plunker:


Shaopeng

unread,
Jan 30, 2014, 2:32:40 AM1/30/14
to libphonenum...@googlegroups.com
Hello Thomas,

Thanks for your interest in the library!

2014-01-29 Thomas Waldecker <thomas.w...@gmail.com>:

Hi list,

I was looking for a phonenumber formatting library for my webapplication based on ASP.NET C# and angular.js.

The size and the memory consumption of the libphonenumber javascript library seems very high.

This is mainly due to the size of the metadata that needs to be loaded. Using the metadata-lite can help, as it doesn't contain example phone numbers and makes the metadata smaller.
 

Is there a way to only use the core of the libphonenumber library without the asyoutypeformatter and the closure library for example?

libphonenumber depends on closure, so there is no easy way to get around that. However, if you don't need the asyoutypeformatter, you can just use phonenumberutil.js directly, which doesn't depend on the asyoutypeformatter.

Cheers,

Shaopeng
 

Do you have some directions to me?

I found a few projects which are based on libphonenumber:

seems a bit hacky, uses the closure library, compiles to a single js file.

uses only the PhoneNumberMetadata.xml which is converted using a pyhton script.
some Numbers are formatted differently to phoneformat and libphonenumber.

Thanks in advance!
Thomas Waldecker

--
You received this message because you are subscribed to the Google Groups "libphonenumber-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libphonenumber-di...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages