We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
第八课中
express已经帮我们构建好了查找view的位置和解析view的引擎。当我们要返回页面时,只要告诉res.render函数返回的页面的名字即可。
res.render('index', { title: 'Express' });
在官网学习到res.render()可以添加三个参数: 字符串、一个对象(local variable)、一个callback函数。
我的问题是,上面代码中的title,和下面代码中的name,这种local variable是在哪定义的呢?
// pass a local variable to the view res.render('user', { name: 'Tobi' }, function(err, html) { // ... });
The text was updated successfully, but these errors were encountered:
{title: 'Express'}就是一个对象,title是对象的属性。
Sorry, something went wrong.
No branches or pull requests
第八课中
在官网学习到res.render()可以添加三个参数: 字符串、一个对象(local variable)、一个callback函数。
我的问题是,上面代码中的title,和下面代码中的name,这种local variable是在哪定义的呢?
The text was updated successfully, but these errors were encountered: