🎩 Automagically Unsubscribe in Angular
Netanel Basal

it’s awesome article but i facing issue when the following line is executing.

const property = this[prop];

so the above line working fine for all the properties but expect setter and getter property and give me the following error.

caused by: object unsubscribed

my setter and getter property definition is

private _model$ = new BehaviorSubject<any>({});


set model(model) {



get model():any {

return this._model$.getValue();