Hi all!
I have this Interface:
export interface UserDataInterfaceFirestore {
user_name?: string;
user_email: string;
...
}
… and I have initialized (in a global provider) an object with values.
I want to initialize a new object to populate with new values, but starting the same values the global object.
The problem occurs when I do the following:
private localUserData: UserDataInterfaceFirestore;
this.localUserData = this.global.userData;
I want to modify only this.localUserData, but when I modify an attribute in this.localUserData it automaticaly is updated also in this.global.userData.
Can anybody help me with this? I think is a fundamental misconception from my side, but I don’t know how to solve it.
Thanks!