Ionic 4 - Documentation error "icon-only"?

Trying to get an icon button to display without the button, the docs say that…

<ion-button>
  <ion-icon slot="icon-only" name="star"></ion-icon>
</ion-button>

…should do it, but it doesn’t!

Had to revert to …

<button ion-button>
  <ion-icon slot="icon-only" name="star"></ion-icon>
</button>

OK, this gets the desired result…

<ion-button fill="clear" >{{a.variable}}
  <ion-icon name="map" slot="end" size="large"></ion-icon>
</ion-button>

…fill=“clear” removes the button outline from the icon. (And vertically aligns the icon with the text!)

1 Like