I have my ngrx state this way
state.data state.dataArchived
I would like to copy data from store.data to state.dataArchived.
selectedSchedulingsOnPopup$ = this.store.pipe(select(selectSchedulingsByBranch));
ngOnInit() {
this.store.dispatch(new GetDirectionsOnGraph({}));
this.selectedSchedulingsOnPopup$.subscribe(value => {
this.selectedSchedulingsOnPopupValue = value;
this.store.dispatch(new GetDirectionsOnGraph(this.selectedSchedulingsOnPopupValue));
});
}
the problem is when state.data
changes, state.dataArchived
changes too
So I would like to get the current value of state.data
without subscribing to it.