小编Mat*_*ier的帖子

在 Visual Studio 2017 ASP.NET MVC 中引导前未加载 Popper

我正在尝试实现弹出窗口,但似乎 poppers.js 不想在 bootstrap.js 之前加载。我试图将包放在引导程序之前,但它不想加载。捆绑配置:

public static void RegisterBundles(BundleCollection bundles)
{
    bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                "~/Scripts/jquery-{version}.js"));

    bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                "~/Scripts/jquery.validate*"));

    // Use the development version of Modernizr to develop with and learn from. Then, when you're
    // ready for production, use the build tool at https://modernizr.com to pick only the tests you need.
    bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                "~/Scripts/modernizr-*"));

    bundles.Add(new ScriptBundle("~/bundles/popper").Include(
              "~/Scripts/popper.js"
              ));

    bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
              "~/Scripts/bootstrap.js"
              ));

    bundles.Add(new StyleBundle("~/Content/css").Include(
              "~/Content/bootstrap.css",
              "~/Content/xbbcode.css",
              "~/Content/site.css"));


}
Run Code Online (Sandbox Code Playgroud)

_布局:

@Scripts.Render("~/bundles/popper")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
Run Code Online (Sandbox Code Playgroud)

我仍然收到此错误:

jQuery.Deferred 异常:Bootstrap 的工具提示需要 Popper.js ( …

asp.net asp.net-mvc bundling-and-minification popper.js

5
推荐指数
2
解决办法
4314
查看次数