2
Reactiveフォームを使用しています。 FormControl ValidatorをHTMLビューで表示する方法
this.productForm = new FormGroup({
'ProductName': new FormControl('', [Validators.required])
})
は、商品名は、バリデータを持っていることを視野に知る方法はあり、それが必要とされています
<span *ngIf="productForm.controls.ProductName.validator?.required" class="required-field">*</span>
私のコンポーネントのコードは、このようなものです:私はこのような観点でFormControlのバリデータを取得したいです