I have angular controller, which injects an array:
class a{
constructor(items){
this.items = items;
this.items[0].name = "abc";
}
edit(){
this.items[0].name = "abc";
})
}
If I will change the value of one item in this array, inside the constructor, it will change the value of the item in the original array.
If I change the value inside the edit method, it will not change now in the original.
What can I do?
Thanks.