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
对比服务端的
app.engine("art", require("express-art-template")); app.set("view engine", "art");
然后
res.render("index", data);
客户端也可以
template.render(source, data, options);
请问webpack的打包如何传递数据呢?
{ test: /\.art$/, loader: "art-template-loader" }
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
这个是客户端吧,我是想在webpack打包的时候就传数据进去,把模板打包成对应的页面,这样是可以的吗
例如index.art <div>{{ title }}</div> 有没有类似这样的写法
<div>{{ title }}</div>
{ test: /\.art$/, loader: "art-template-loader", options: { data: { title: "title1" } } }
然后打包成 <div>title1</div>
<div>title1</div>
因为是想打包成静态页面,不用后台来res.render,也不打算ajax请求数据然后客户端template.render
No branches or pull requests
对比服务端的
然后
客户端也可以
请问webpack的打包如何传递数据呢?
The text was updated successfully, but these errors were encountered: