unregisterOnDestroy Method
Cancels the registration of automatically completing the store when the associated component or service is destroyed
@returns this
The current instance of the store, allowing for method chaining
API
unregisterOnDestroy(): this;Example
import {Injectable} from '@angular/core';
import {signalState, NgStore} from '@bitfiber/ng/rx';
@Injectable()
class ProductsStore extends NgStore {
products = signalState<any[]>();
#ready = this.markAsReady();
}import {Component, inject} from '@angular/core';
@Component({
selector: 'bf-products',
providers: [ProductsStore],
})
export class ProductsComponent {
readonly store = inject(ProductsStore)
// Cancels the registration of automatically completing the store
.unregisterOnDestroy()
.initialize();
}