Font-awesome icons not loading on Angular4 project Font-awesome icons not loading on Angular4 project angular angular

Font-awesome icons not loading on Angular4 project


You should be using the class fa instead of fas. The fa class sets the font-face. (hat tip to @mike-hill)

View source on http://fontawesome.io/icon/address-card/


Font-awesome version 5+

fa prefix has been depricated from version 5. In order to use fas prefix install version 5+ and include in your styles.

install:

yourapp$npm install @fortawesome/fontawesome-free --save

package.json

"styles": [   "node_modules/@fortawesome/fontawesome-free/css/all.css",   "src/styles.scss"  ],


After adding dependencies to Angular.json or Angular-cli.json.1) stop running App2) start itIt will recognize new resources