[英]How can I setup html template in hbs templating engine in nestjs application in the views folder
I Have images , css , and js files in my public folder and In my views folder I have handlebars(hbs) formatted files in the nest.js application.我的公共文件夹中有 images 、 css 和 js 文件,在我的 views 文件夹中,我在 nest.js 应用程序中有 handlebars(hbs) 格式的文件。 How can I access images , css , and files in .hbs files.
如何访问 .hbs 文件中的图像、css 和文件。
There are already pretty nice tutorial on the docs https://docs.nestjs.com/techniques/mvc文档上已经有相当不错的教程https://docs.nestjs.com/techniques/mvc
and the repo https://github.com/nestjs/nest/tree/master/sample/15-mvc .和回购https://github.com/nestjs/nest/tree/master/sample/15-mvc 。
if you want to handle hbs files in nest.js, you should install hbs moulde using command npm install hbs.如果你想在 nest.js 中处理 hbs 文件,你应该使用命令 npm install hbs 安装 hbs 模具。 after installation your problem will be solved
安装后你的问题将得到解决
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.