node.js - Parameter passing problem in node+express+ejs. When passing parameters, it always prompts that the parameters are undefined.
给我你的怀抱
给我你的怀抱 2017-06-05 11:08:33
0
1
1115

Brief description of the structure:

index.ejs:显示数据
list.ejs:后台获取到的数据列表模板
admin.js:数据渲染文件,用来获取后台数据的

The connection between the three is to get all the articles in the database through admin.js, pass them to list.ejs through locals.list, and then render list.ejs to the index.ejs part.
index.ejs

The following is a list of background data obtained through include introduction

Find ejs online 2.0 You can pass parameters through <%- inclund("article/list",{list:locals.list}), but no parameters are received in list.ejs. The console still reports an error
list.ejs

admin.js


The following is the error message

给我你的怀抱
给我你的怀抱

reply all(1)
漂亮男人

Everyone who has passed by can give me your opinion

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template