我试图将许多脚本组合成一个像这样的
bundles.Add(new ScriptBundle("~/bundles/freeboard").Include(
"~/Scripts/Freeboard/DatasourceModel.js",
"~/Scripts/Freeboard/DeveloperConsole.js",
"~/Scripts/Freeboard/DialogBox.js",
"~/Scripts/Freeboard/freeboard.js",
"~/Scripts/Freeboard/FreeboardModel.js",
"~/Scripts/Freeboard/FreeboardUI.js",
"~/Scripts/Freeboard/JSEditor.js",
"~/Scripts/Freeboard/PaneModel.js",
"~/Scripts/Freeboard/PluginEditor.js",
"~/Scripts/Freeboard/ValueEditor.js",
"~/Scripts/Freeboard/WidgetModel.js"));
在我看来:
@section Scripts {
@Scripts.Render("~/bundles/freeboard")
}
看起来捆绑包中缺少脚本,因为我有一个错误“Uncaught ReferenceError:FreeboardUI未定义”,但正如我们在捆绑包中看到的那样,我们有脚本FreeboardUI。