angular 5 - how to use Angular Material tooltip

Discussão em 'Angular' iniciado por levi, Novembro 5, 2024.

  1. levi

    levi Guest

    I'm following this link to implement a tool tip in angular 5.

    https://material.angular.io/components/tooltip/api

    But I am not understanding how practically implement this.

    any body can add an example of a ts and html files of how to implements it ?

    edit

    Thanks for all quick responses.

    i try to add this to my html:

    <button mat-raised-button matTooltip="Info about the action" aria-label="Button that displays a tooltip">

    </button>


    and this in the ts:

    import {MatTooltipModule} from '@angular/material';


    but now i getting this error in the console:


    Error: The "mat-" prefix cannot be used in ng-material v1 compatibility mode. It was used on an "button" element. Error: The "mat-" prefix cannot be used in ng-material v1 compatibility mode. It was used on an "button" element
    ​

    any bode know why? thanks!

    Continue reading...

Compartilhe esta Página