I have a class of object
Class file (consumption.ts)
export class ConsumptionDetails {
Id: string;
Status: string;
Description: string;
Quantity: number;
}
Function 1: (consumption.component.ts)
this.lineItems$.subscribe((result: BindingState<ConsumptionDetails>) => {
if(result){
this.tempObj = result;
}
}
Function 2: (consumption.component.ts)
this.tempObj.Status = 'Submitted';
console.log(this.tempObj);
Here 'Submitted' status not updated with 'tempObj.Status', Instead of I am getting error
ERROR TypeError: Cannot add property Status, object is not extensible