I am creating a Angular form and while validation, I tried to show message when field is not filled so for that I used ng-for in span tag but I have got error
html - >
<div class="form-group">
<input type="text" formControlName='fname' placeholder="First Name">
<span *ngFor="signupForm.control['fname'].haserror(required)"> Enter your Name </span>
</div>
error -
Can't bind to 'ngFor' since it isn't a known property of 'span'. ("m-group">
<input type="text" formControlName='fname' placeholder="First Name">
<span [ERROR ->]*ngFor="signupForm.control['fname'].haserror(required)"> Enter your Name </span>
</div>