Shilpa
Published in : 2022-02-28
My visual code tslint and some other extensions are installed for my angular project. While reviewing my code, It shows isStopped is deprecated. what should I use instead of isStopped?
I want to rewrite my code with latest available methodology. Deprecated functions are causing showstopper to the application sometimes!
public createPatientChart(dataItemSet: any): any {this.showLoader = true; if (!this.sbscrbr.isStopped) { this.chart = this.healthService.createPatientBMIChart(dataItemSet, this.chartId, this.optionPool, this.extendedOptions); this.showLoader = false; return this.chart; } this.showLoader = false; return null; }
Any compatible code alternative for this code block?
Join our community and get the chance to solve your code issues & share your opinion with us
Sign up Now
Rakshit Date : 2022-03-01
Best answers
34
Best answers
34
If you would like to check, whether your all subscribers (this.sbscrbr variable) are unsubscribed - In that case, RxJS introduced
closed
property. Here I rewrote the code for you,closed will do the trick for you.