htmlionic-frameworkiconsionicons

How to change the title of an icon in Ionic


It's just a small issue, but I've looked into other posts but none of the solutions work (at least for me). I want to change the title that appears on hover. I've tried using pointer-events: none;, but it stops the onDelete function

<ion-icon name="trash-outline" (click)="onDelete(message)" class="del" ></ion-icon>


Solution

  • As per the Ionic Forum post do the following:

    <span title="whatever" (click)="onDelete(message)" >
      <ion-icon name="trash-outline" class="del"></ion-icon>
    </span>
    

    and in your css

    .del {
      pointer-events:none
    }
    

    And here is the solution as a stackblitz.