I have the following segment of code in a format that is quite common in Angular:
<div class="col col-xs-12 col-sm-6">
<input class="form-control" type="text" [(ngModel)]="siteUrl"
#siteUrl="ngModel" name="siteUrl" required>
<div *ngIf="siteUrl.invalid && (siteUrl.dirty || siteUrl.touched)">
<div *ngIf="siteUrl.errors['required']" class="red">
siteUrl is required
</div>
</div>
</div>
During transpile I get the following error:
An unhandled exception occurred: Cannot assign value "$event" to template variable "siteUrl". Template variables are read-only.
I am using Angular 13 and copied this segment of code directly from another working Angular 13 application.