<form>
<div class="form-group">
<label for="firstName">First Name</label>
<input required ngModel name="firstName" #firstName="ngModel" (change)="log(firstName)" id="firstName" class="form-control">
<div class="alert" *ngIf="!firstName.valid">First Name should not be empty</div>
</div>
<div class="form-group">
<label for="comment">Comment</label>
<textarea id="comment" cols="30" rows="10" class="form-control"></textarea>
</div>
<button class="btn btn-primary">Submit</button>
</form>
Whenever tried to run this component Node says "error NG8003: No directive found with exportAs 'ngModel'."
I was expecting to get rid of this issue and also want to reply how i was able to solve the issue`