Adding text and a fonticon inside a button


If you have been looking how to add text and an icon inside your button. Look no further!

Download the following plugin npm install nativescript-ngx-fonticon --save

Follow the installation instructions on :

Adding text and a fonticon is as simple as :

<Button text="{{'fa-facebook' | fonticon}} Sign in Facebook" class="fa btn btn-primary" (tap)="loginFacebook()"></Button>


Similarly, if you are using Angular date/time pipes, you can create a combination button text like this:

<Label class="small" text="{{ | date:'ss'}} secs" fontSize="15"></Label>

And the result is: