0

I have the following button:

<button class="glyphicon glyphicon-option-horizontal" (click)="myFuncion()"></button>

After upgrade my bootstrap library from 3 to 4.2.1 the icon stop showing.

I was tried to insert the glyphicon glyphicon-option-horizontal classes into span or i but it's not looks like before

ArmoArmo
  • 105
  • 10

2 Answers2

2

as Bootstrap 4+ have to use the fontawesome icons instead of glyphicons please check the below stackblitz https://stackblitz.com/edit/angular-gfjyrc

<P>Boot strap 4+ using font awesome</P>
<button type="button" class="btn btn-primary"><i class="fa fa-search"></i>Primary</button>

<p>Bootstrap 4+ using glyphicon</p>

<button type="button" class="btn btn-primary">
    <span class="glyphicon glyphicon-search"></span> Search
  </button>

Please check this url for more details https://getbootstrap.com/docs/4.0/migration/ enter image description here

Dexter
  • 518
  • 3
  • 12
  • 40
0

Could you try this please,

<button type="button" class="btn btn-default" (click)="myFuncion()">
  <span class="glyphicon glyphicon-search"></span> Search
</button>

Update: I've just found that glyphicon were removed from BT4, so you should add it manually. Check this out.

rcanpahali
  • 2,565
  • 2
  • 21
  • 37