Bootstrap Glyphicons not displaying in angular2

前端 未结 11 1799
天涯浪人
天涯浪人 2020-12-24 14:20

I am trying to use bootstrap glyphicons in my angular2 app. I have installed bootstrap using the command npm install bootstrap --save My code snippet is



        
11条回答
  •  南笙
    南笙 (楼主)
    2020-12-24 14:50

    From https://www.w3schools.com/bootstrap4/bootstrap_icons.asp -

    Bootstrap 4 does not have its own icon library (Glyphicons from bootstrap 3 are not supported in BS4). However, there are many free icon libraries to choose from, such as Font Awesome and Google Material Design Icons. To use Font Awesome icons, follow these steps:

    Install Font-Awesome from the terminal in your project folder

    npm install --save font-awesome
    

    and add the following line to your main stylesheet -

    @import "~font-awesome/css/font-awesome.css";
    

    You can now access all the icons available in the installed Font-Awesome library. Refer this link for the complete list of icons - Official Font Awesome Website

提交回复
热议问题