angular - How can I use withLatestFrom with a parametrized selector? - Stack Overflow

admin2025-04-17  2

I've got a parametrized selector like this

mySelector = (myId: number) => createSelector(selectList, list => list.find(item => item.id = myId);

and I need to use it in an effect, like this

myEffect$ = createEffect(
  () => {
   this.actions$.pipe( 
    ofType(myAction),
    withLatestFrom(this.store.select(mySelector(myAction.ItemId)),
    // 
转载请注明原文地址:http://anycun.com/QandA/1744850326a88495.html