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

235
Visualizações
How to Retrieving data from Mongodb with Angular?

I'm trying to retrieve data from MongoDB with Angular but I don't really know how to since I'm quite new to this. I'm using node.js with an Express framework. I already have my MongoDB client and server running and using studio-3T for MongoDB as a GUI for mongo.

Here is the connection with mongodb in my app.js:

var MongoClient = require('mongodb').MongoClient

MongoClient.connect('mongodb://localhost:27017/', function (err, db) {
  if (err) throw err

  db.collection('loodgieters').find().toArray(function (err, result) {
    if (err) throw err
    else if (result.length) {
      result.render('loodgieters', {
        "loodgieters" : result
      });  
    }
    console.log(result);  
  });
});

In MongoDB, I have added a collection named "loodgieter". key: hometext. value: this is some text

Now, I need to use angular to somehow access this collection and show the data in my HTML page

Anyone an idea?

about 4 years ago · Santiago Trujillo
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