Angular 2+ garbage collector for RxJS subscriptions.
- Clean, beautiful code
- One property for all component's observables
npm i -S ngx-rx-collector
For v1 see this branch.
Use the pipe-able operator
untilDestroyed and pass there your component instance. That is pretty much it.
If you use AoT build (which is enabled by default) you must have at least empty
ngOnDestroy on your component.
If you don't use AoT build then simply call
ngxRxCollectorDisableAoTWarning() in your
ngOnDestroy required in this case.
AoT build + no ngOnDestroy logic:
Non-AoT build + no ngOnDestroy logic:
Any build + ngOnDestroy logic: