0
我没有使用表单标签,在我的HTML代码 的数据是成功的清晰路线也被注入,但验证是火灾发生后我做出提交和新角2:提交数据后,确认火
<div class="col-lg-6 col-md-8">
<input type="text" [disabled]="!isEditable" class="form-control" id="field-1" name="field1" pattern = "^[0-9]*$" placeholder="" maxlength="30" required [(ngModel)]="country.countryCode" #field1 = ngModel>
<div class="alert alert-danger" [hidden]=" (field1.valid || field1.pristine)">
<ul>
<li> In vlaid name </li>
<li [hidden]="errorData.errorDetails?.countryCode==null">{{errorData.errorDetails?.countryCode}}</li>
</ul>
</div>
</div>
if (this.country.id == 0 || this.country.id == undefined) { // add
this.dataService.add("country/save", this.country).then((status: any) => {
if (status.success == false) {
} else if (saveAction == 'saveNew') {
this.country = {};
} else if (saveAction == 'saveBack') {
this.router.navigate(['/comm/country']);
}
});