I am trying to get data from subscribe and it seems to go past that step. I would like to know what am I doing here ?
this.store.dispatch(new PrimaryActions.CreateData(this.Id)).subscribe(
result => {
console.log('Response',result); // not getting the data
this.saved.emit(result);
this.onDialogClose();
});
@Action(PrimaryActions.CreateData)
createData(context: StateContext<PrimaryStateModel>, action: PrimaryActions.CreateData) {
return this.dataService.createData(action.id).pipe(
tap((result: Modal) => {
console.log('response', result); // getting the right data here
this.store.dispatch(new PrimaryActions.LoadData());
})
);
}