O'Reilly logo

NativeScript for Angular Mobile Development by Nathanael J. Anderson, Nathan Walker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using font icons with the nativescript-ngx-fonticon plugin

It sure would be nice to swap all those boring label buttons out with nice crisp icons, so let's do that. NativeScript provides support for custom font icons out of the box using Unicode values on text attributes on buttons, labels, and much more. However, with Angular, we can take advantage of another nifty plugin, which will provide a nice Pipe allowing us to use the font names for ease of use and clarity.

Install the following plugin:

npm install nativescript-ngx-fonticon --save

For this app, we will use the versatile font-awesome icons, so let's download that package here from the official site: http://fontawesome.io/.

Inside of it, we will find the font files and the css we will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required