Trigger OnChanges by changing a property on the data bound object

Viewed 1889

How can I get ngOnChanges() to trigger if a property on one of the data bound objects changes rather than having to set the property to a new object.

// component
@Input() myObj: ObjType;
// component code...

This doesn't trigger the change

// outside component
dataBoundObj.width = 1000;

This does

dataBoundObj = new ObjType();
1 Answers
Related