Bootstrap Glyphicons not displaying in angular2 Bootstrap Glyphicons not displaying in angular2 angular angular

Bootstrap Glyphicons not displaying in angular2


Boostrap 4 does not support Glyphicons anymore, you can use Font Awesome instead:

npm install --save fortawesome/fontawesome-free

OR install the official Angular Fontawesome Package: https://github.com/FortAwesome/angular-fontawesome

and add the css File to your .angular-cli.json

"apps": [          {             ....             "styles": [                "styles.css",                "../node_modules/bootstrap/dist/css/bootstrap.css",                "../node_modules/font-awesome/css/font-awesome.css"             ],             ...         }       ]],

Replace CSS class with the Font Awesome classes:

<i class="navbar-toggler-icon fa fa-bars"> </i>

recompile app: ng serve


You have to import

<link data-require="bootstrap-css@3.3.6" data-semver="3.3.6" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.css" />

to your index.html


I installed bootstrap3 as npm install bootstrap@3 and it started working

just need to add in angular-cli.json:-

   "styles": [        "styles.css",        "../node_modules/bootstrap/dist/css/bootstrap.css"     ],