I have an address component that need to be shown two places on the same page. Inside the component there is an element for the streetbuilding identifier
<label for="StreetNumber">Husnummer</label>
<input id="StreetNumber" name="streetNumber" #streetNumber="ngModel" type="text" class="form-control"
[(ngModel)]="Address.StreetBuildingIdentifier" [ngClass]="{ 'is-invalid': (streetNumber.dirty || streetNumber.touched || this.TabIsViewed) && streetNumber.errors }" required StreetBuildingIdentifier />
But the problem is when I use the Address two places they will share the ngmodel and both fields reports error when validating the input.
How can I make sure the validation is connected to its own field only?