我想選擇一個項目,追加相同的項目在相同的代碼類似,而在選擇標籤我們做什麼問的問題在計算器如何選擇的項目追加在相同的標籤中angular2
我的模板,
<div class="form-group" *ngFor="let i of show">
<label for="exampleInputEmail1">Tags</label>
<input type="text" class="form-control" [formControl]="form.controls['tags']" (keyup)="tags(key.value)" {{i}}#key id="exampleInputEmail1" aria-describedby="emailHelp">
</div>
<div class="col-sm-12 nopadding ">
<ul class="searchlist" >
<li *ngFor="let detail of tag">
<a (click) = "catch(detail.type)">{{detail.type}}</a>
</li>
</ul>
</div>
在選擇一個我推選擇陣列並將其綁定到我的HTML
我的TS,
catch(val){
this.tag = [];
this.show.push(val);console.log("val"+this.show)
}
可有人請建議我幫...........
??? – micronyks
是micronyks,同樣喜歡在計算器 – klp
我想在我選擇 – klp