u010200767
图森破少年
采纳率23.9%
2018-05-05 13:52

ngrx/store的select方法的问题

5
已采纳
  @Effect()
  shipperSignUpEffect$ = this.actions$
    .ofType<signUpActions.ShipperSignUp>(
      signUpActions.ShipperSignUpActionTypes.ShipperSignUpAction
    ) // 返回值为**shipperSignUp***的Action类型(ofType本质上是个rxjs库的filter)
    .pipe(
      map(action => action.payload), // ShipperSignUpAction的payload: shipper obj --> 这里返回 ****** shipper object ******
      withLatestFrom(this.store.select(fromAuth.getSignUpToken)),
      exhaustMap(([account, token]) =>
        this.shipperService
          .shipperSignup(account.shipper, token)
          .pipe(
            map(rsp => new signUpActions.ShipperSignUpSuccess()),
            catchError(error =>
              of(new signUpActions.ShipperSignUpFailed(error))
            )
          )
      )
    );
        ```
        请问this.store.select(fromAuth.getSignUpToken)的select是什么意思?里面的参数是reducer还是字符串呢?谢谢!
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

相关推荐