javascript - NodeJS - Handlebars - Data not Parsed / Contains Nothing in Handlebars -
i have problem node js express & handlebars. in routes, i've tried collect data mongoose query. after that.. i've tried print via console.log before render view , parse array variable. code :
console.log(datamenusebulan); res.render('laporan/index', {layout:false, penjualanhariini:penjualanhariini, datamenusebulan:datamenusebulan, datasetahunmak:datasetahunmak, datasetahunmin:datasetahunmin, dataseminggumak:dataseminggumak,dataseminggumin:dataseminggumin, penjualankemarin:penjualankemarin, penjualanbulanini:penjualanbulanini, penjualanbulanlalu:penjualanbulanlalu, csrftoken:req.csrftoken()});
in console, variable succesfully printed, result : image result
in view, i've tried echo variable inside javascript tag code :
console.log({{datamenusebulan}});
it's work array variable, not variable. have idea guys?
Comments
Post a Comment