[英]What files can be .erb files
I just realized that the .erb
extension can be added to .js
files (what a time saver that would have been). 我刚刚意识到
.erb
扩展名可以添加到.js
文件中(本来可以节省时间)。 Is there a list of file types that can take advantage of the features of .erb
? 是否有可以利用
.erb
功能的文件类型列表? Or is any text file .erb
capable? 或者是任何文本文件
.erb
能够? I primarily use variable placement eg <%= @user.id %>
我主要使用变量放置,例如
<%= @user.id %>
Yes, you basically can add an .erb
extension to any text file and start templating away :) 是的,你基本上可以为任何文本文件添加
.erb
扩展名并开始模板化:)
I personally only tried it on views and JS files, but I don't see why it wouldn't work for other files. 我个人只在视图和JS文件上尝试过它,但我不明白为什么它对其他文件不起作用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.