Hi,
I cant make icon appear using local node_modules files
I installed this :
npm install --save-dev @fortawesome/fontawesome-free
my .angular-cli.json :
 "styles": [
        "styles.css",
         "../node_modules/node_modules/@fortawesome/fontawesome-free/css/all.css",
      ],
      "scripts": [
        "../node_modules/node_modules/@fortawesome/fontawesome-free/js/all.js",
      ],
no icon are apprearing
but it works using this :
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
so why is it not working with local files ????
regards
Just a guess. Maybe you have to copy node_modules/@fortawesome/fontawesome-free/webfonts/ to your project folder.
Example directory structure:
And your include looks weird "../node_modules/node_modules/...". Double "node_modules"?
Hi!
Thanks for being part of the Font Awesome Community.
I'm not an angular developer
 "styles": [
        "styles.css",
         "../node_modules/node_modules/@fortawesome/fontawesome-free/css/all.css",
      ],
      "scripts": [
        "../node_modules/node_modules/@fortawesome/fontawesome-free/js/all.js",
      ],
I think this is wrong, this is loading both css and js version. You should choose one of them.
Please take a look here: https://fontawesome.com/how-to-use/on-the-web/using-with/angular
let me know if that helps
I added all styles in angular.json and it worked
"styles": [
                            "node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss",
                            "node_modules/@fortawesome/fontawesome-free/scss/regular.scss",
                            "node_modules/@fortawesome/fontawesome-free/scss/solid.scss",
                            "node_modules/@fortawesome/fontawesome-free/scss/brands.scss",
                            "src/styles.scss"
                        ]
I'm going to close here, feel free to comment if this is still an issue
Most helpful comment
I added all styles in angular.json and it worked
"styles": [ "node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss", "node_modules/@fortawesome/fontawesome-free/scss/regular.scss", "node_modules/@fortawesome/fontawesome-free/scss/solid.scss", "node_modules/@fortawesome/fontawesome-free/scss/brands.scss", "src/styles.scss" ]