angular-bone icon indicating copy to clipboard operation
angular-bone copied to clipboard

Uncaught Error: [$injector:modulerr]

Open karneaud opened this issue 11 years ago • 2 comments

i get this

Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.2.20/$injector/modulerr?p0=main&p1=Error%3A%2…dflare.com%2Fajax%2Flibs%2Fangular.js%2F1.2.20%2Fangular.min.js%3A18%3A139) angular.js:3848

karneaud avatar Sep 08 '14 19:09 karneaud

I have the same error ! Warning the name in the view (index.cshtml)

... @Scripts.Render("~/bundles/AwesomeAngularMVCApp") My application is called MVCAngularJS. :) it's to work now ! :)

sauvef74 avatar Jul 30 '15 16:07 sauvef74

My answer: /****Index.cshtml****/

{{models.helloAngular}}

<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.20/angular.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.20/angular-route.min.js"></script>

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

/_AngularJSMVC.js_*/ var app = angular.module('AngularJSMVC', ['ngRoute']);

app.controller('LandingPageController', ['$scope', function ($scope) { $scope.models = { helloAngular : 'I work' } }]);

/_BundleConfig.cs_**/ using System.Web; using System.Web.Optimization;

namespace AngularJSMVC { public class BundleConfig { // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new StyleBundle("~/Content/css").Include( "~/Content/site.css"));

        bundles.Add(new ScriptBundle("~/bundles/AngularJSMVC")
            .IncludeDirectory("~/Scripts/Controllers", "*.js")
            .Include("~/Scripts/AngularJSMVC.js"));

        BundleTable.EnableOptimizations = true;
    }
}

}

Regards.

NetRevolutions avatar Mar 13 '16 06:03 NetRevolutions