0

I have specified the Angular and bootstrap in the Bundle.config file as

bundles.Add(new ScriptBundle("~/bundles/angular").Include(
                    "~/Scripts/angular.js",
                     "~/Scripts/angular-*",
                    "~/Scripts/bootstrap.js"));

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

and I had specified these bundles in Layout.cshtml file inside the body as

@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/angular")
@Styles.Render("~/Content/bootstrap")
@RenderSection("scripts", required: false)

Inside the Global.asax file I had specified the Budleconfig in Application_Start() as

protected void Application_Start()
    {
        AreaRegistration.RegisterAllAreas();

        WebApiConfig.Register(GlobalConfiguration.Configuration);
        FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
        RouteConfig.RegisterRoutes(RouteTable.Routes);

        BundleConfig.RegisterBundles(BundleTable.Bundles);

        AuthConfig.RegisterAuth();
    }

even though the Angular and Bootstrap files are not been Bundled Can anyone please point me what I am missing here

Note: I have checked the path it is correct.

Angular and Bootstrap JS path

Bootstrap CSS Path

5
  • have you tried setting the path to "~/Content/Scripts/...... Commented Jun 21, 2018 at 9:39
  • Possible duplicate of ASP.NET MVC Bundle not rendering script files on staging server. It works on development server Commented Jun 21, 2018 at 9:40
  • please do check if Webgrease is installed. Commented Jun 21, 2018 at 9:40
  • What's the function declaration look like where you are registering the bundles. Unless I'm mistaken, a lot of this is done by convention, and if you have the function name wrong, it might not be registering anything? Commented Jun 21, 2018 at 10:10
  • @TAHASULTANTEMURI I had checked the question stackoverflow.com/questions/21270834/… already, I have Webgrease Installed but it is not working Commented Jun 21, 2018 at 10:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.