Node.js-Expess-MongoDB-CRUD icon indicating copy to clipboard operation
Node.js-Expess-MongoDB-CRUD copied to clipboard

list is not showing

Open Joelthobias opened this issue 4 years ago • 7 comments

you can see the erreor using the given link

https://drive.google.com/file/d/1PIZ7SOKyVm0IQEZGuRA4038ntpciMHSh/view?usp=sharing

Joelthobias avatar Sep 22 '20 11:09 Joelthobias

https://drive.google.com/file/d/1PIZ7SOKyVm0IQEZGuRA4038ntpciMHSh/view?usp=sharing

I also have the same problem. For any solution for that problem

kottaisamy1998 avatar Sep 29 '20 10:09 kottaisamy1998

In list data not showing but only showing the edit and delete only

kottaisamy1998 avatar Sep 29 '20 10:09 kottaisamy1998

Resolved this issue in #7 pull request

ahsanihsan avatar Oct 19 '20 21:10 ahsanihsan

Look good

Savalone47 avatar Oct 22 '20 08:10 Savalone47

To fix the list not showing, add .lean() to your code as below

router.get('/list', (req, res) => { Employee.find((err, docs) => { if (!err) { res.render("employee/list", { list: docs, }); } else { console.log('Error in retrieving employee list :' + err); } }) .lean() // It is prevent the warning when trying to display records })

innocent-maina avatar Jul 10 '21 09:07 innocent-maina

Showing lean is not defined...how to fix this?

sakshi-seth avatar Sep 04 '21 06:09 sakshi-seth

Please help me with the error, its not showing any data which i have entered. Its getting saved in the database but not in the list. i ll share my code please help me. project.zip

Ullas1804 avatar Jan 16 '22 16:01 Ullas1804