Search code examples
ionic-frameworkionic3ionic5

Recreate Ionic3 button with Ionic5


How can I recreate an ionic5 button that would look like defined in my old ionic3 app syntax.

<button ion-button color="light" clear (click)="foo()">
      TEXT {{bar}}&nbsp;
      <ion-icon name="md-arrow-round-up" large></ion-icon>
</button>

If I copy paste this code into my ionic5 app the button would be not formatted but just plain white the default browser button.


Solution

  • Here is what you want:

    <ion-button color="light" fill="clear" (click)="foo()">
        TEXT {{bar}}&nbsp;
        <ion-icon mode="md" name="arrow-up" size="large"></ion-icon>
    </ion-button>
    

    You can see the new docs here.