I am working on an angular application in which I have a matInput and I am trying to show an icon in the placeholder of matInput. The font-awesome icon I am trying to use is info-circle My Code
<mat-form-field>
<input matInput
class = "fas"
placeholder= "Default Value"
[(ngModel)]="Value"
style="font-family: Arial, 'Font Awesome'">
</mat-form-field>
Using this code I can see an icon but its not coming as expected.
I have cross-checked the icon code and its correct. I am not sure what is going wrong.
I'm not sure if this works. I think you need to add a
mat-icon
into the form field and mark this asmatPrefix
:See docu: material.angular.io/components/form-field/api