Вот моя @Effect()
функция:
@Effect()
EventDeleted: Observable<Action> = this.actions.pipe(
ofType(productActions.OnEventDelete.TYPE),
map((action:productActions.OnEventDelete) => {
console.log('action payload', action.payload);//getting id
return action.payload
}),
mergeMap((eventId:number) =>
this.calendarService.deleteEvent(eventId).pipe( //calling service
map(() => (new productActions.EventDeleteSuccess(eventId))), //not called
catchError(err => of(new productActions.DeleteEventFail(err)))
)
)
)
в моем сервисе:
deleteEvent(eventId:number): Observable<{}> {
console.log(eventId, 'number');
return this.http.delete<ModelEvent>(environment.baseUrl+`Calendar/${eventId}`)
.pipe(
tap(data => console.log('res', eventId)), //not consoles..!?
catchError(this.handleError)
)
}
не в состоянии понять проблему.кто-нибудь мне помочь?