'How to call getter function automatically whenever setter function set value

I have Getter and Setter method in Typescript. I have get intial value using getter() method in ngOnInit(). After that i made some update and set the value using Setter() method.

In that case i want to call getter() method automatically. I have tried with Observal() and Subscribe() .It not working.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source