2

I have set the bundleConfig file like this :

bundles.Add(new ScriptBundle("~/bundles/MyTest").Include("~/Scripts/test.js").Include(
                        "~/Scripts/test.init.js")); 
bundles.Add(new ScriptBundle("~/bundles/Angular").Include("~/Scripts/angular.min.js")); 

I call them is my Layout like this :

@Scripts.Render("~/bundles/Angular") <!-- ERROR -->
@Scripts.Render("~/bundles/MyTest") <!-- SUCCESS -->

Where's my error, please ?

http://blog.falafel.com/blogs/noel-rice/2012/09/19/adding-your-own-scripts-and-style-sheets-to-mvc-4-bundles

2 Answers 2

6

Bundling in ASP.NET MVC will ignore files ending with .min.js. You will have to add the development version of the file.

bundles.Add(new ScriptBundle("~/bundles/Angular").Include("~/Scripts/angular.js"));
Sign up to request clarification or add additional context in comments.

Comments

1

Try this:

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

.NET will add .min for you if you are not in debug

Comments

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.