删除后删除服务`tap`不起作用

时间:2019-03-01 16:38:06

标签: angular7 ngrx-effects

这是我的KeyError at /new/ ('title', 'content', 'category') Request Method: GET Request URL: http://localhost:8000/new/ Django Version: 2.1.7 Exception Type: KeyError Exception Value: ('title', 'content', 'category') Exception Location: /home/bob/python-virtualenv/blog/bin/blog/posts/forms.py in __init__, line 11 函数:

@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)))
                )
            )
    )

无法理解该问题。有人帮我吗?

0 个答案:

没有答案