我正在尝试更改角度材质输入上的占位符文本颜色。似乎默认为黑色,但由于背景颜色较深,我希望它为白色。
我可能已经阅读了该网站上有关如何执行此操作的所有帖子,但似乎没有任何效果。::ng-deep 和 mat-placeholder 不是选项。
这是我的 HTML 的一个片段:
<form #searchForm="ngForm" class="example-full-width mr-auto">
<mat-form-field style="width: 350px; font-size: 14px; margin-bottom: -15px;">
<mat-label style="color: white;">Search for an Employee</mat-label>
<input matInput [(ngModel)]="userIdInput" placeholder="Enter at least 2 characters of a name or ID"
Run Code Online (Sandbox Code Playgroud)