• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: @fortawesome/angular-fontawesome and unicode

Resolved: @fortawesome/angular-fontawesome and unicode

0
By Isaac Tonny on 18/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I am upgrading font-awesome in my angular application earlier we were having hardcoded the URL of font-awesome (from CDN ) in style.scss file, now we got to have an angular package which is as below:
ng add @fortawesome/angular-fontawesome@3.0.0 and also similar SVG icons.
and we have changed the approach from <i class="fa fa-lock"><i> to <fa-icon icon="faLock"></fa-icon>
Now the challenging stuff here is that in my existing application we have used unicode as below:
I have changed the above to below
but icons are not coming up, do we still need to define the .css file in angular.json to work for Unicode (the path of fort-awesome of node_modules )?
Please note that my version of fortawesomesupportsfont-awesome version 5+`.
ADDED packages

Answer:

Ok, if you inspect your code where you use you new icons, you should see something like that : enter image description here
That means that you don’t have the css way to display FA icons :
So you can’t use the unicode trick to display an icon anymore. Unless, on top of the angular svg FA library, you install the “web” way : https://fontawesome.com/v5/docs/web/setup/get-started. You will then have a regular font-family that you will be able to use.
Tell me if the part about the SVG makes sense to you if I expressed it correctly. Cheers.

If you have better answer, please add a comment about this, thank you!

angular font-awesome
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How to give rank on datetime column group by another column with userid in it

24/03/2023

Resolved: Passing 2 functions in onChange in react

24/03/2023

Resolved: Why doesn’t stringstream consume output during hex formatting?

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.