我正在尝试删除数组中的重复值对象但不起作用...我认为重复函数正在运行但未反映在li列表中。你能找出我必须改变的地方吗?
我的服务文件:
addComp(Names,c){
this.item.push({ name: Names, componentid: c});
this.uniqueArray = this.removeDuplicates(this.item, "name"); //this line issue
this.item=this.uniqueArray; //this line issue
}
Run Code Online (Sandbox Code Playgroud)