Get your phone’s market name using your phone’s model name using ng-fone.

Hi Friends,

Sorry, Its been a longtime since I wrote a post but you know, I was busy as usual experimenting with new stuff and trying to make the world better through technology.

Recently I worked on an application (cordova application) in which I was trying to get the phone’s market name or consumer friendly name. But through my code I was only able to get the model name. I researched a lot online and to my surprise couldn’t get an angular module to perform that. All I found was a list of all devices made by Jared Rummler. So I did what programmers do; yeah, I wrote it.

You can install it using the below command (if you have npm package manager)

npm install ng-fone

To use it in your application just follow the below steps.

Step 1:

After installation please reference it in your html file as shown below:

Step 2:

In your app.js file add ngFone as a dependency.

Step 3:

In your controller add fonename as a parameter as shown below.

Now mobilename will contain an object with four keys i.e., marketname, brandname, labelname and Model. They can be accessed like mobilename.marketname or mobilename.labelname.

If the model is not found then mobilename will be blank.

I have given an example app here

And the code can also be found in the above url.

Special thanks to Jared Rummler and Charlie Youakim.

Suggestions are welcome.


Liked it? Take a second to support admin on Patreon!