📜  按名称从数组中删除角度 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:15.798000             🧑  作者: Mango

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