close
<form #form1="ngForm" (ngSubmit)="submit(form1)">
<div>
<label for="employeeName">employee name</label>
<input id="employeeName" type="text" name="employeeName" ngModel #employeeName="ngModel" required/>
<span *ngIf="employeeName.errors?.required && form1.submitted">employee name is required</span>
</div>
<div>
<label for="companyAddress">company address</label>
<input id="companyAddress" type="text" name="companyAddress" ngModel #companyAddress="ngModel" required/>
<span *ngIf="companyAddress.errors?.required && form1.submitted">company address is required</span>
</div>
<div>
<input type="submit" value="submit" [disabled]="form1.invalid" />
</div>
</form>
arrow
arrow
    全站熱搜
    創作者介紹

    Chill_Radio 發表在 痞客邦 留言(0) 人氣()