mit dem folgenden Code:Angular 2 Tag Validierung nicht zu stoppen einreichen
<form #theForm="ngForm" novalidate>
<div *ngIf="pickUpAddress.cannotVerify">
<div class="form-group">
<sh-manual-address [(ngModel)]="pickUpAddress" #manualAddress="ngModel" [address]="pickUpAddress" name="manualAddress"></sh-manual-address>
</div>
</div>
</form>
<div>
<button type="button" [disabled]="!theForm.control?.valid " (click)="navigateToConfirmation()">Continue</button>
</div>
Und der Brauch Teil:
<ng-form name="manualAddress">
<div>
<div class="label">
Postcode
</div>
<div class="input">
<input ngControl="pickUpAddress.postcode" #postalcode="ngModel" [(ngModel)]="address.postcode" name="postcode" placeholder="Postcode"
required/>
<div *ngIf="postalcode.errors" class="input-error">Postcode is mandatory</div>
</div>
</div>
</ng-form>
Das Problem wird auf die Schaltfläche Weiter sogar aktiviert immer, wenn die Postleitzahl nicht ausgefüllt ist . Nach meinem Verständnis sollte es funktionieren, aber nicht. Natürlich gibt es andere Elemente in der Form - diese verhindern den Button. Was vermisse ich?
In anderen Welten: Wie kann ich die beiden Komponenten miteinander kommunizieren lassen?