Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

140
Visualizações
Printing the data posted with axios to the screen with node js

I want to print the data in the inputs in the image to the screen via node js, how can I do this?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You could use a combination of an Array and an v-for statement

Basically:

//The UI
    <ul>
        <li v-for="(item, key) in array" v-bind:key="key">
            //Here you can use now every item in the Array like this for example
            <span>{{ item.name }}</span>
        </li>
    </ul>

//The code
export default {
    data() {
        return { array: [] };
    },
    methods: {
        apiDataFunction() {
            axios
                .post('xxx') //Or whatever you have
                .then((res) => {
                    this.array.push(res.data);
                });
        }
    }
};

If you could give some more information I could help more. For example, how the data looks that you retrieve with axios etc.

I didn't test this code personally so it may be, that you would need to pack this array into an computed statement

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda