I am trying to get data from ngrx store , but as soon as the subscription completes it must go to finalize , and that is not happening
const { selectIds, selectEntities, selectAll, selectTotal } = adapter.getSelectors(state);
this.subscription = this.store.select(selectAll)
.pipe(
finalize(() => {
console.log('completed')
}),
.subscribe(
o => {
//perform some action
},
error => {
console.error(error);
}
);
If you want to listen to some actions in the store you can try this, imagine you want to listen to CREATE_SUCCESS action and then do some control when your entity is created