Reputation: 155
I am developing an application with anguarjs and taking an error following like this :
Failed to instantiate module myApp due to: Error: [$injector:modulerr] http://errors.angularjs.org/1.4.5/$injector/modulerr?p0=u...) at Error (native) at https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js:6:416 at https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js:38:98 at n (https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js:7:322) at g (https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js:37:180) at https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js:37:349 at n (https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js:7:322) at g (https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js:37:180) at eb (https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js:40:435) at d (https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js:19:381
I read all suggestions about this error and applied but they are not usefull. my layout page like this:
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular-route.min.js"></script>
<script src="~/app/myApp.js"></script>
<script src="~/Scripts/angular/messages.js"></script>
</head>
<body ng-app="myApp" class="hold-transition skin-blue sidebar-mini">
.
.
.
.
.
and my myApp.js page is like that:
var myApp= angular.module('myApp', ['ngRoute', 'ngMessages', 'ui.bootstrap']);
my controllers are in another folder and beginning like this:
myApp.controller('templateController', [ '$scope','$rootScope', 'SharedDataService', "templateFactory", "$log", "$uibModal", function ( $scope,$rootScope, SharedDataService,templateFactory, $log, $uibModal) {
.
.
.
Also I didnt create my own directive and I checked angular.js and angular-route.js are downloaded. Why am i taking this error ? any idea?
Upvotes: 1
Views: 314
Reputation: 1417
I'd comment this if I had the rep (as I'm not sure about it), but I don't think ui.bootstrap
is being included anywhere on the page, which would cause the app to fail to instantiate.
EDIT: Could you provide the full lines of the debug output?
Upvotes: 1