remove element from array typescript angular 8 code example
Example 1: typescript remove object from array
const index = myArray.indexOf(key, 0);
if (index > -1) {
myArray.splice(index, 1);
}
Example 2: angular delete from array by name
this.data = this.data.filter(item => item !== data_item);