node.js - One of my route.ejs does not show header like all other route
问题描述
One of my route.ejs (post) does not show the header like other routes even though it has <%- include(header source) -%>
like all of others.
It shows nav link but it does not show the logo, and when I clicked the link on the nav it crashed my site. Any help would be appreciate much. Thank you.
This is the route
app.get('/posts/:postTitle', isLoggedIn, function(req, res) {
const requestedPostTitle = req.params.postTitle;
Post.findOne({
title: requestedPostTitle
}, function(err, post) {
res.render('post', {
title: post.title,
content: post.content
});
});
});
解决方案
推荐阅读
- delete-file - 按文件名删除文件以确定 WinSCP 中的日期
- javascript - 如何在javascript中隐藏重音字符?
- azure - SSH 到 Docker 容器的 Azure 应用服务
- java - 我不知道为什么我的数组没有用 Java 填充
- php - NotFoundHttpException Laravel/流明
- jquery - 滚动上的动画 SVG 路径
- excel - 什么是默认的单元格边框样式和宽度?
- reactjs - 在 Chart.js 中为 y 轴使用较大的值
- three.js - FBX Loader three.js 中使用的 Mixamo 模型出现多个 material.skinning =false 错误
- laravel - 如何从 laravel 中的控制器操作返回刀片组件