【问题标题】:ngrx/effects 5.2.0 reporting ts2684ngrx/effects 5.2.0 报告 ts2684
【发布时间】:2018-03-14 10:23:54
【问题描述】:

为什么一直报ts2684:the'this'context of type'void' is not assignable to method'this'?

 @Effect()
  loadList$: Observable<Action> = this.action$.ofType('LOAD').pipe(
    map(()=>{
      console.log(1);
      return new LoadSuccess();
    })
 ); 

【问题讨论】:

  • pipe( map(危重症

标签: angular rxjs


【解决方案1】:

我知道原因:) map 应该从 'rxjs/operators' 而不是 'rxjs/operators/map' 导入

【讨论】:

    猜你喜欢
    • 2019-01-11
    • 1970-01-01
    • 1970-01-01
    • 2018-04-18
    • 1970-01-01
    • 1970-01-01
    • 2018-06-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多