At the time of implementing pipe in the ngrx it is showing error Angular 18

Discussão em 'Angular' iniciado por Sarath S, Novembro 5, 2024.

  1. Sarath S

    Sarath S Guest

    Cannot read properties of undefined (reading 'pipe')

    this is the code I have written

    register$ = createEffect(():any=>{
    this.actions$.pipe(
    ofType(registerUser),
    mergeMap(action=>
    this.userService.userRegister(action.firstName,action.lastName,action.email,action.phone,action.password).pipe(
    map(user=> registerUserSuccess({user:user}))
    )
    )
    )
    })

    export class UserService {

    constructor(private readonly apollo: Apollo) {
    }
    userRegister(firstName:string,lastName:string,email:string,phone:number,password:string):Observable<any> {
    return this.apollo.mutate({
    mutation: REGISTER_USER,
    variables: { userInput: { firstName, email, lastName, phone, password } },
    })

    }


    How to solve this problem

    Continue reading...

Compartilhe esta Página