I've been using Fontawesome on my site for a few years now, I have recently updated to Angular 14 & Node 18.
The icons are still showing on my local build, but not on production.
I have downloaded V6 Fontawesome and have embedded this to my project -
Index.html
<link rel="stylesheet" href="./assets/web-fonts-with-css/css/all.css" media="none" onl oad="if(media!='all')media='all'">
I have included all the css files from the download as required, hoever I am just getting blank spaces where the icons should be.
I am using Chrome 109.0.5414.119
CodePudding user response:
- Install font-awesome npm package
- Add font-awesome css path in
styles
array of angular.json file. It might look like below
"styles": [
...
"node_modules/font-awesome/scss/font-awesome.scss",
...
]
- After that you can use it like
<em ></>
CodePudding user response:
The new update of Fontawesome has moved away from using 'fas-fa' and instead is using 'fa'fa-'.