我想一個字符串數組從我的輸入綁定,所以在HTML文件中我寫了這一點: <div *ngFor="let word of words; let in=index" class="col-sm-3">
<div class="form-group">
<input type="text" [(ngModel)]="words[in]" class="form-control"
這是我的代碼: HTML: <div *ngFor="let reject of rejects, let i = index">
<h2>{{reject.reason}}</h2>
<input type="text" [(ngModel)]="reject.reason" [ngFormControl]="inputField">
<rt-dropdown (s
我試圖用兩個子組件(Infos和Localisation)創建一個父組件(名爲Action),並將子項的輸入與父模型綁定。 這是模型 export class Action{
titre : string;
localisation = new Localisation();
}
export class Localisation{
region : strin