Skip to content
Advertisement

Tag: ngrx

Angular-Listening to store changes & emit a value from a Service component to a different component – only after Service completes certain operations

Here we have to classes GetDataAsyncService which waits for change in the store (and not executes the block of code under it until a change in the store ( this.getDataAsyncService.getAsyncData().subscribe((data)=>{ )}). When it is called from MainComponent it will get return of(propA); (from GetDataAsyncService) before the block of code in the listener is executed – because the listener is still

Can’t reinizialize ngrx’s state’s feature

I’m working with ngrx and this is my initialState: i need reinitialize the state feature. This is my reducer’s case: I’m expecting that this reducer, clean my feature state, returning it equal to the initialState. But the state dosen’t change. If i log the initialState, it is equal to the actual state The only way I can reset it is

Advertisement