我正在尝试使用角度为2的材质的md-input指令但是我遇到了一个奇怪的错误。我完全按照说明进行操作,but I keep getting something that looks like this.我不知道是什么导致了占位符下方的双线。我搜索了Github问题 一无所获。代码看起来完全像这样:
<div class="curtain"></div>
<md-card class="z-depth-4">
<md-card-title>
Login
</md-card-title>
<md-card-content class="center">
<md-input-container>
<input md-input
placeholder="Account Number"
[(ngModel)]="accountNumber"/>
</md-input-container>
<br>
<md-input-container>
<input md-input
placeholder="Username"
[(ngModel)]="username"/>
</md-input-container>
<br>
<md-input-container>
<input md-input
placeholder="Password"
type="password"
[(ngModel)]="password"/>
</md-input-container>
</md-card-content>
<md-card-actions>
<button class="btn-flat blue-text btn-large right">Login</button>
</md-card-actions>
</md-card>
我能得到的任何帮助都会很棒。谢谢!
答案 0 :(得分:0)
您的index.html
上可能有多个角度素材样式表条目。
确保您只有这些:
link href="https://unpkg.com/@angular/material/core/theming/prebuilt/indigo-pink.css" rel="stylesheet"
link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" (tag symbols excluded in comment)