3
votes

I m trying to integrate fontawesome in my ionic4 app.

I have followed this tutorial https://yannbraga.com/2017/06/28/how-to-use-custom-icons-on-ionic-3/

with some modifications for ionic4.

Now I can display the fontawesome using

<i class="fas fa-alicorn"></i>

or

<ion-icon class="fas fa-alicorn"></ion-icon>

But I would like to use like this (like a normal ion-icon)

<ion-icon name="fas fa-alicorn"></ion-icon>

When i try this i ve got an error : "aarlbodj.entry.js:1 icon was not resolved" . Anyone in this case ?

2

2 Answers

1
votes

ion-icon component resolves the name attribute from ion-icons.You are giving some class names as name attribute in ion-icon component.

If you want to use fontawesome icons in an Ionic 4 app, Install this package.

0
votes

angular-fontawesome is an official angular component for Font Awesome5 and it's easily integrated with Ionic4 projects. Go through the instructions on following link. https://stackoverflow.com/a/54324301.