1.1.0 • Published 4 years ago
@jsstore/tools v1.1.0
@jsstore/tools
Tools for angular projects.
Operators
1. tillAllive
A operator to unsubscribe observables before destroying angular elements like components, directives and pipes etc.
import { tillAlive } from '@jsstore/tools';
@Component()
class MyComponent implements OnDestroy {
constructor() {
observable.pipe(tillAlive(this)).subscribe((value) => {
# use value
});
}
ngOnDestroy() {}
}