【问题标题】:Add href inside material tooltip在材质工具提示中添加 href
【发布时间】:2020-02-23 12:39:21
【问题描述】:

我有一个带有工具提示的材料信息图标。如何在工具提示中添加链接?

<i matTooltip='Make Changes<a href="https://myweb.com">here</>' matTooltipClass="tooltipFont" matTooltipPosition="above" class="fa fa-pencil" aria-hidden="true" style="float:right;margin-right: 8%"></i>

所以工具提示如下所示

进行更改here

【问题讨论】:

    标签: angular npm angular-material tooltip


    【解决方案1】:

    【讨论】:

      【解决方案2】:

      正如@Pandiyan Cool 提到的,mat-tooltip 不支持 HTML。相反,您可以使用 SAT Popover:https://ncstate-sat.github.io/popover/
      您可以轻松地将 HTML 内容放入其中并根据需要进行设计。

      【讨论】:

        【解决方案3】:

        mat 工具提示不支持 HTML 内容。 参考:https://github.com/angular/components/issues/5440#issuecomment-313740211

        【讨论】:

        • 如果您觉得答案有帮助,请随时为答案投票
        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2022-11-07
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-01-14
        • 2019-12-03
        相关资源
        最近更新 更多