我有一個 angular 13 的 ractive 形式,如下所示:

所以我想像這樣驗證這個表格:

我收到以下錯誤:

和

注意到在組件中我有一個 get 函式,例如:
get firstname() {
return this.myGroup.get('firstname');
}
uj5u.com熱心網友回復:
模板錯了。
<div *ngIf="firstname?.errors?.['required']">First name is required</div>
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/472038.html
上一篇:Svelte僅支持es6 語法。將“compilerOptions.target”設定為“es6”或更高
下一篇:二級鍵作為型別
