0

I have a component which receives an input which is an object. onchanges does not detect changes on an object. So I need to use DoCheck to watch for changes on input object. So, in this case, I cannot use oninit method because even first-time doCheck method is hit. The problem is I cannot know is it the first time the data is initialized or its just data change. I need to do just some modification on data changes. Is there a better way to detect changes on input when it's an object so that I can know when it's the first set of data or just change of data.

Daniel
  • 3,541
  • 3
  • 33
  • 46
Hacker
  • 7,798
  • 19
  • 84
  • 154

0 Answers0