font awesome with Angular 2

前端 未结 4 1056
一整个雨季
一整个雨季 2020-12-19 09:42

I started an NG2 app and wanna add font awesome. I npm installed it with : npm install --save font-awesome angular2-font-awesome. I added to project in systemjs.config.js:

4条回答
  •  时光说笑
    2020-12-19 10:14

    I think you need to add it to your .angular-cli.json section like this:

    you may have it under a different name in your node_modules. try to go down the list in node_modules and see under what name it has been installed. The other thing I noticed is npm install --save font-awesome angular-font-awesome

    `"styles": [
        "styles.css",
        "../node_modules/bootstrap/dist/css/bootstrap.min.css",
        "../node_modules/font-awesome/css/font-awesome.css",
        "../node_modules/npm-font-open-sans/open-sans.styl"
    
    
      ],
    

提交回复
热议问题