简体   繁体   English

如何在视图文件夹中的 nestjs 应用程序中的 hbs 模板引擎中设置 html 模板

[英]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 和文件。

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM