Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试构建一个动态字符串,然后将其包含一个部分。本质上,我想做这样的事情:
<%= partial("questions/<%= filename %>") %>
但这行不通。关于如何做到这一点的任何提示?
这是简单的字符串连接!
<%= partial("questions/" + filename) %>
感谢 Mike McNiel(Sails.js 的创建者)在 Twitter 上回答这个问题。