我增加了一些服务,我的应用程序(这是工作的罚款前手),现在它不会加载,并给我的错误$injector:modulerr
我的应用程序是这样的:
var app = angular.module("HtJobPortal", ["LocalStorageModule"]);
var serviceBase = "http://autherserverlink/";
var resourceBase = "http://resourceserverlink/";
(function() {
"use strict";
app.constant("ngAuthSettings", {
apiServiceBaseUri: serviceBase,
apiResourceBaseUri: resourceBase,
clientId: "TMS_Portal"
});
app.config(function ($httpProvider) {
$httpProvider.interceptors.push("authInterceptorService");
});
app.run(["authService", function (authService) {
authService.fillAuthData();
}]);
})();
而且我已经宣布的服务宗旨是:
<!-- JS Scripts -->
<script src="//code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
<!-- Application Directive -->
<script src="Scripts/controllers/app.js"></script>
<!-- Services -->
<script src="Scripts/services/authService.js"></script>
<script src="Scripts/services/authInterceptorService.js"></script>
<script src="Scripts/services/tokensManagerService.js"></script>
我有各地的其他类似的错误一看,看到这个错误可以通过一些事情,所以我造成的只是不确定如何缩小这个范围?所以我认为最好的地方是从声明和应用程序本身开始?
'LocalStorageModule'从哪里来?我没有看到它在脚本列表中。 –
修复它谢谢 - 一定错过了那一个 - 如果你想弹出它作为其他人的答案,然后我会标记为正确的,如果你喜欢? –
没问题,每个人都会遇到这种情况。我已经把它作为答案。 –