title: ASP.NET MVC 5 BundleConfig.cs bundle is giving error about angular not being defined- only when visiting web page externally from server
body: <p>I've got a c# based asp.net mvcish website which is giving me grief upon visiting the page via https outside of the server it's hosted on.</p>
  
  <p><strong>Part of BundleConfig.cs:</strong></p>
  
  <p>public class BundleConfig
      {
          public static void RegisterBundles(BundleCollection bundles)
          {</p>
  
  <pre><code>          bundles.Add(new ScriptBundle("~/bundles/libraries").Include(
                        "~/Scripts/libs/angular.js", 
                        "~/Scripts/libs/jquery.js", 
                        "~/Scripts/libs/bootstrap.js",
                       "~/Scripts/libs/respond.js",
                      "~/Scripts/libs/angular-route.js", 
                      "~/Scripts/libs/ng-table.js",
                       "~/Scripts/libs/ui-bootstrap-tpls.js", 
                     "~/Scripts/libs/angular-resource.js", 
                     "~/Scripts/libs/loading-bar.js",
                       "~/Scripts/libs/angular-animate.js", 
                     "~/Scripts/libs/angular-cookies.js", 
                      "~/Scripts/libs/angular-translate.js",
                       "~/Scripts/libs/angular-translate-loader-url.js",
                       "~/Scripts/libs/angular-translate-storage-local.js", 
                      "~/Scripts/libs/angular-translate-loader-static-
                       files.js",
                       "~/Scripts/libs/angular-translate-storage-
                      cookie.js",
                       "~/Scripts/libs/toaster.js", 
                     "~/Scripts/libs/angular-local-storage.js",
                        "~/Scripts/libs/ng-table-export.js", 
                     "~/Scripts/libs/alasql.js","~/Scripts/libs/isteven- 
                      multi-select.js")); 
  
  
  
  
  
          bundles.Add(new 
     ScriptBundle("~/bundles/myAngular").IncludeDirectory("~/Scripts/app/", 
     "*.js", true));
  </code></pre>
  
  <p><strong>These Bundles are used in Views/Shared/_layout.cshtml</strong></p>
  
  <p>@Scripts.Render("~/bundles/libraries")
  @Scripts.Render("~/bundles/myAngular")</p>
  
  <p>I've only run in to this issue once https was switched on in IIS for this site.</p>
  
  <p><strong>The issue is</strong> that upon loading the site externally, I get a referenceerror: angular is not defined in site/bundles/myAngular</p>
  
  <p>myAngular isn't referenced anywhere else other than _layout.cshtml</p>
  
  <p>Have tried many tricks referenced on the stackoverflow to no success, any assistance would be much appreciated.</p>