Question : Remove single item from array in angular
Answered by : 2-programmers-1-bug
deleteMsg(msg:string) { const index: number = this.data.indexOf(msg); if (index !== -1) { this.data.splice(index, 1); }
}
Source : https://stackoverflow.com/questions/40462369/remove-item-from-stored-array-in-angular-2/40462431 | Last Update : Mon, 01 Jun 20
Question : angular remove element from array
Answered by : arsen-tabaku
removeElement(data:any){ const index: number = this.list.indexOf(data); if (index !== -1) { this.list.splice(index, 1); } }
Source : | Last Update : Tue, 04 Oct 22