AngularJS Bundle Config failing (angular-sanitize.js)

System.Web.HttpException: The controller for path ‘/bundles/angular/’ was not found or does not implement IController.

This error is thrown on every page load across my application. Since I’m not bundling/minifying in Debug, this only occurs in QA/Dev and Production

I’ve tried this: angular resource is mistaken as C# MVC controller (like adding the .min script tags to index.cshtml in-line, and the other suggestions)

An I’ve read this: MSDN: Bundling and Minification

Here is the relevant code:


public class BundleConfig
    public static void RegisterBundles(BundleCollection bundles)
#if (!DEBUG)
        BundleTable.EnableOptimizations = true;
        bundles.UseCdn = true;

        bundles.Add(new ScriptBundle("~/bundles/jquery/script")

        bundles.Add(new ScriptBundle("~/bundles/angular/script")

        bundles.Add(new ScriptBundle("~/bundles/application/script")
            .IncludeDirectory("~/app", "*.js", true)

        //Markup removed for clarity.




//Markup removed for clarity.

Directory Paths


This include angular-sanitize, of course

I’ve also tried both removing and including


from angular-sanitize.min.js

If you need more information – please leave a comment! Thanks

Source: AngularJS

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.