I have a question regarding the subscribe method

Discussão em 'Angular' iniciado por vinudev, Dezembro 2, 2024.

  1. vinudev

    vinudev Guest

    I have the following code which I am studying

    getUser(): void {

    this.service.getUsers().subscribe(
    {
    next: (resposta) => {
    console.log(resposta)
    this.users = resposta
    },


    error: (erroo: any) => {
    console.log('ocorreu algum erro')
    console.log(erroo)
    }
    }
    )
    }


    my question is about what does '(answer)' mean after next, is it an array function?

    Continue reading...

Compartilhe esta Página