Install Font Awesome 5 with NPM

后端 未结 5 513
-上瘾入骨i
-上瘾入骨i 2021-02-03 19:21

I am working with Angular(6) application, and I am trying to use FA icons, and drop-down with no luck. I am successfully using FA(4) icons, like:



        
5条回答
  •  再見小時候
    2021-02-03 20:12

    Alternatively, you can install fontawesome as a module in your js code.

    Steps:

    1. npm install @fortawesome/fontawesome-free --save
    2. in your javascript code import the all.js file as instructed at the very bottom of the instructions here.
    import '@fortawesome/fontawesome-free/js/all.js';
    

    - or -

    require('@fortawesome/fontawesome-free/js/all.js');
    

提交回复
热议问题