so What I want is, on button click add item.name to a new array :
<button (click)="addDistrict(item.name)" *ngFor="let item of items" ion-button>{{item.name}}</button>
myDist = [];
addDistrict(item.name){
this.myDist.push(item.name)
}
How to do that properly ?
addDistrict(item)andthis.myDist.push(item)