🎩 Automagically Unsubscribe in Angular
Netanel Basal
35115

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>({});

@Input()

set model(model) {

this._model$.next(model);

}

get model():any {

return this._model$.getValue();

}

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.