Usuń pojedynczy element z tablicy w kąt

deleteMsg(msg:string) {
    const index: number = this.data.indexOf(msg);
    if (index !== -1) {
        this.data.splice(index, 1);
    }        
}
2 Programmers 1 Bug