Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is bundleConfig ignoring my include directory

In my BundleConfig.cs file I am trying to include all of my angularjs files in one step. I have:

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

bundles.Add(new ScriptBundle("~/bundles/App").IncludeDirectory(
     "~/App", "*.js", true));

The first include works fine. It includes all of the angular files; however, the second include does not. When I go to sources in the browser it does not show up.

Any Suggestions?

like image 274
Robert Avatar asked Dec 18 '25 05:12

Robert


1 Answers

Apparently the step that I missed was adding:

 @Scripts.Render("~/bundles/app")

To the _Layout.cshtml page.

Now everything works as intended

like image 69
Robert Avatar answered Dec 19 '25 21:12

Robert



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!