角材料:MatIcon上的MatTooltip位置和样式损坏

时间:2019-01-25 14:03:13

标签: css angular-material tooltip positioning material

我正在尝试在材料输入字段中使用材料图标。此图标应显示一个重要的工具提示。

结果是动画效果很好,但是样式完全没有样式(如正文),并且工具提示的位置完全错误。

我哪里出错了?

我的html:

class Animal
{
    public int Id { get; set; }

    public override int GetHashCode()
    {
        return 2108858624 + Id.GetHashCode();
    }
}

我的少了

<section>
    <div class="row">
      <mat-form-field>
        <input matInput name="newPin" placeholder="Neue PIN" required type="password"
           [(ngModel)]="newPin" [disabled]="!selectedToken">          
          <mat-icon matTooltip="{{getPinTooltip()}}" [matTooltipPosition]="'below'">
              info
          </mat-icon>         
      </mat-form-field>
      <mat-form-field>
        <input matInput name="controlPin" type="password" required 
           placeholder="Neue PIN wiederholen"
           [(ngModel)]="controlPin" [disabled]="!selectedToken">
      </mat-form-field>
    </div>
</section>

它是这样的: enter image description here

0 个答案:

没有答案