bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery/dist/jquery.js",
"~/Scripts/signalr/jquery.signalR.js",
"~/Scripts/inputFileUpload.js",
"~/Scripts/jquery.slimscroll/jquery.slimscroll.js",
"~/Scripts/MyScript.js",
"~/Scripts/queue.js",
"~/Scripts/mutation-summary.js",
"~/Scripts/tree_mirror.js"));
我有捆绑〜/ bundles / jquery,如何将此捆绑包包含到我的csproj文件中,以便我可以将此捆绑包推送到服务器
答案 0 :(得分:0)
@Scripts.Render("~/bundles/jquery")
在剃须刀视图中使用此功能。
要注册,您需要调用BundleConfig.cs的register方法,如:
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
}