everybody, what I must install for mongodb to work in angular 4?
in my angular 4 project db is object of client of MongoClient class as this code:
MongoClient.connect('mongodb://localhost:27017/test', (err, client) => {
// Client returned
var db = client.db('test');});
when I write db.collection() inside this code:
let db = DbClient.connect();
db.collection();
in app.module.ts file I get this error:
"[ts] Property 'collection' does not exist on type 'void'."
where DbClient is class defined in my database file.
in this project I have nodejs: 8.10.0 mongodb version 2.2.33 and @type/mongodb: 3.0.9, this version of mongodb was 3.0.5 I have downloaded older version after search for solution but still not working yet.
please anybody can help me to solve this error?
Expected 1-3 arguments, but got 0, I tried to give the name but not solved. @Krishna