NetanelBasal / angular2-take-until-destroy

Declarative way to unsubscribe from observables when the component destroyed
37 stars 10 forks source link

Don't complete all instances of a component #6

Closed efidiles closed 7 years ago

efidiles commented 7 years ago

Fixes https://github.com/NetanelBasal/angular2-take-until-destroy/issues/5

@NetanelBasal @jjenzz

hi guys, I've created a PR with @jjenzz suggestion.

Also added a test which checks that when ngOnDestroy occurs on a component, the subject of other instances is not completed.

The test will fail with the current code and will pass with the fix

@NetanelBasal I've updated a bit the npm scripts. hopefully they make sense. feel free to suggest any updates if you prefer anything to be / look different

NetanelBasal commented 7 years ago

Great job. Thanks! I'm adding your name to maintainers.

NetanelBasal commented 7 years ago

Thanks, @jjenzz, good catch!