Hello I have issue with ngrx/effects - pipe undefined. Below I attached sample code which is correct along compilator but browser shows undefined pipe error.
constructor(
private actions$: Actions,
private ethereumService: EthereumService
) { }
loadUser$ = createEffect(() =>
this.actions$.pipe(
ofType(loadAccountState),
mergeMap(() => this.ethereumService.getAccountDetails()
.pipe(
map(setAccountStateCompleted),
catchError(() => EMPTY)
)
)
)
);
附录:
StoreModule.forRoot(reducers),
EffectsModule.forRoot([AccountEffects]),
EDIT:即使是这种样本也存在同样的错误——-
logActions$ = createEffect(() =>
this.actions$.pipe(
ofType(AccountActions.loadAccountState),
tap(action => console.log(action))
), { dispatch: false });
PS2。 我正在使用<条码>。 地图编码>,是作为<条码>进口到根基的主要减量文档
import {
createSelector,
createFeatureSelector,
ActionReducerMap,
} from @ngrx/store ;
import * as fromAccount from ./account.reducer ;
export interface State {
account: fromAccount.State;
}
export const reducers: ActionReducerMap<State> = {
account: fromAccount.updateAccountReducer,
};
export const selectAccountState = createFeatureSelector<fromAccount.State>( account );
//Account Selectors
export const selectCurrentUser = createSelector(
selectAccountState,
fromAccount.selectActiveAccount
);
我的法典有什么错误,请帮助