繁体   English   中英

错误:$ injector:modulerr模块错误由于以下原因,无法实例化模块printStation的错误:[$ injector:modulerr

[英]Error: $injector:modulerr Module Error Failed to instantiate module printStation due to: Error: [$injector:modulerr

我正在用anguarjs开发应用程序,并出现如下错误:

由于以下原因,无法实例化模块myApp失败:错误:[$ injector:modulerr] http://errors.angularjs.org/1.4.5/ $ injector / modulerr?p0 = u ...),错误位于HTTPS的错误(本机) : //ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js:6:416网址https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular。在n( https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js:7:322 )处在g( https://ajax.googleapis )上的min.js:38:98 .com / ajax / libs / angularjs / 1.4.5 / angular.min.js:37:180 ), 网址https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js:在g( https://ajax.googleapis.com/ajax )在n( https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js:7:322 )处的37:349 eb( https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js:40处的/libs/angularjs/1.4.5/angular.min.js:37:180: 435 )在d( https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js:19:381

我阅读了有关此错误的所有建议并予以应用,但它们没有用。 我的布局页面是这样的:

<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">

   .
   .
   .
   .
   .

我的myApp.js页面是这样的:

var myApp= angular.module('myApp', ['ngRoute', 'ngMessages', 'ui.bootstrap']);

我的控制器在另一个文件夹中,开始像这样:

myApp.controller('templateController', [ '$scope','$rootScope', 'SharedDataService', "templateFactory", "$log", "$uibModal", function ( $scope,$rootScope, SharedDataService,templateFactory, $log, $uibModal) {
.
.
.

我也没有创建自己的指令,并检查了angular.js和angular-route.js是否已下载。 为什么我会出现此错误? 任何想法?

如果有代表,我会对此发表评论(因为我不确定),但是我不认为ui.bootstrap被包含在页面上的任何位置,这将导致应用程序无法实例化。

编辑:您能提供调试输出的全部内容吗?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM