IE浏览器问题0x800a139e - JavaScript运行时错误:[$ injector:modulerr] http://errors.angularjs.org/1.5.0/$injector/modulerr?

时间:2016-03-28 09:36:45

标签: javascript angularjs single-page-application

我收到的错误是无法识别我在我的应用程序中使用的AppModule,它在Chrome& Mozila,一旦我切换到IE我曾经得到以下错误(用AngularJS v1.5.0实现):

  

0x800a139e - JavaScript运行时错误:[$ injector:modulerr]   http://errors.angularjs.org/1.5.0/ $注射器/ modulerr?

完整的错误消息:

  

0x800a139e - JavaScript运行时错误:[$ injector:modulerr]   http://errors.angularjs.org/1.5.0/ $注射器/ modulerr P0 = latModule&安培; P1 =错误%3A%20%5B%24injector%3Anomod%5D%20http%3A%2F%2Ferrors.angularjs.org%2F1.5.0%2F%24injector% 2Fnomod%3Fp0%3DlatModule%0A%20%20%20原子%20Anonymous%20function%20(HTTP%3A%2F%2Fstldwsappd1.corp.mastercard.test%3A7450%2​​Flatredesigndev%2FScripts%2Fangular.min.js%3A25%3A130) %0A%20%20%20原子%20B%20(HTTP%3A%2F%2Fstldwsappd1.corp.mastercard.test%3A7450%2​​Flatredesigndev%2FScripts%2Fangular.min.js%3A24%3A169)%0A%20%20% 20AT%20Anonymous%20function%20(HTTP%3A%2F%2Fstldwsappd1.corp.mastercard.test%3A7450%2​​Flatredesigndev%2FScripts%2Fangular.min.js%3A24%3A424)%0A%20%20%20原子%20Anonymous%20function %20(HTTP%3A%2F%2Fstldwsappd1.corp.mastercard.test%3A7450%2​​Flatredesigndev%2FScripts%2Fangular.min.js%3A39%3A285)%0A%20%20%20原子%20N%20(HTTP%3A% 2F%2Fstldwsappd1.corp.mastercard.test%3A7450%2​​Flatredesigndev%2FScripts%2Fangular.min.js%3A7%3A353)%0A%20%20%20原子%20克%20(HTTP%3A%2F%2Fstldwsappd1.corp.mastercard 。测试%3A7450%2​​Flatredesigndev%2FScripts%2Fangular.min.js%3A39%3A135)% 0A%20%20%20原子%20FB%20(HTTP%3A%2F%2Fstldwsappd1.corp.mastercard.test%3A7450%2​​Flatredesigndev%2FScripts%2Fangular.min.js%3A43%3A158)%0A%20%20%20原子%20C%20(HTTP%3A%2F%2Fstldwsappd1.corp.mastercard.test%3A7450%2​​Flatredesigndev%2FScripts%2Fangular.min.js%3A20%3A447)%0A%20%20%20原子%器20Ac%20(HTTP% 3A%2F%2Fstldwsappd1.corp.mastercard.test%3A7450%2​​Flatredesigndev%2FScripts%2Fangular.min.js%3A21%3A252)%0A%20%20%20原子%20fe%20(HTTP%3A%2F%2Fstldwsappd1.corp .mastercard.test%3A7450%2​​Flatredesigndev%2FScripts%2Fangular.min.js%3A20 3A69%)

Wiered的事情是,当我习惯在IE浏览器中刷新页面时它工作正常,我的应用程序应该在IE 10&上方。

我的Html页面如下所示:

<html ng-controller="homeController" ng-app="latModule" xmlns="http://www.w3.org/1999/xhtml" class="locations-template">
<head>
    <meta http-equiv="X-UA-COMPATIBLE" content="IE=10" />
    <title ng-bind="title"></title>
    @if (Model.IsDebugMode == false)
    {
        <base href="/@latAppName/" />
    }
    else
    {
        <base href="/" />
    }
    <link rel="icon" type="image/png" sizes="16x16" href="~/Content/lat-style/img/favicon-16x16.png">
    <link href="~/Content/bootstrap.css" rel="stylesheet" />
    <link href="~/Content/lat-style/fonts.css" rel="stylesheet" type="text/css" />
    <link href="~/Content/lat-style/prism.css" rel="stylesheet" type="text/css" />
    <link href="~/Content/lat-style/app.css" rel="stylesheet" type="text/css" />
    <link href="~/Content/lat-style/main.css" rel="stylesheet" type="text/css" />
    <link href="~/Content/lat-style/datepicker/jquery.datetimepicker.css" rel="stylesheet" type="text/css" />
    <link href="~/Content/font-awesome.css" rel="stylesheet" type="text/css" />
</head>
<body ng-init="serviceTypePopup = true;quickTourFlag=true;isShowQuickTour=true">
    <header class="external-app-nav">
        <span></span>
        <div>
            <a href="javascript: void(0)" class="logo">
                <img src="~/Content/lat-style/img/logo.png" alt="">
                <div class="headerTitle">Location Administration Tool</div>
            </a>
            <div class="headerLog">
                <span class="userName"><span ng-bind="homeLatUserInfo.userFirstName"></span> <span ng-bind="homeLatUserInfo.userLastName"></span> <span ng-show="homeLatUserInfo">(</span><span ng-bind="homeLatUserInfo.userId"></span><span ng-show="homeLatUserInfo">)</span></span><br />
                <span class="date-time" ng-bind="homeLatUserInfo.logonDate"></span>
                <br />
                <span class="serviceType" ng-bind="serviceType.name | uppercase"></span>
            </div>

        </div>
    </header>
    <iframe id="exportIF" style="display:none"></iframe>
    <div class="body-template row">
        <div class="col-lg-3">
            <div class="menuBar-container">
                <ul class="menuBar">
                    <li ng-click="onClickOfDashboard()" ng-class="{active:dashboard}">
                        @if (Model.IsDebugMode == false)
                        {
                            <a href="/@latAppName/dashboard">
                                <span class="fa fa-tachometer"></span>
                                <span class="textNav">Dashboard</span>
                            </a>
                        }
                        else
                        {
                            <a href="/dashboard">
                                <span class="fa fa-tachometer"></span>
                                <span class="textNav">Dashboard</span>
                            </a>
                        }
                    </li>
                    <li ng-click="onClickOfErrors()" ng-class="{active:errors}">
                        @if (Model.IsDebugMode == false)
                        {
                            <a href="/@latAppName/errors">
                                <span class="fa fa-exclamation-triangle"></span>
                                <span class="textNav">Errors</span>
                            </a>
                        }
                        else
                        {
                            <a href="/errors">
                                <span class="fa fa-exclamation-triangle"></span>
                                <span class="textNav">Errors</span>
                            </a>
                        }

                    </li>
                    <li ng-click="onClickOfUploads()" ng-class="{active:uploads}">
                        @if (Model.IsDebugMode == false)
                        {
                            <a href="/@latAppName/uploads">
                                <span class="fa fa-upload"></span><span class="textNav">Upload History</span>
                            </a>
                        }
                        else
                        {
                            <a href="/uploads">
                                <span class="fa fa-upload"></span><span class="textNav">Upload History</span>
                            </a>
                        }

                    </li>
                    <li ng-click="onClickOfLocations()" ng-class="{active:locations}">
                        @if (Model.IsDebugMode == false)
                        {
                            <a href="/@latAppName/locations">
                                <span style="left:4px;" class="fa fa-map-marker"></span>
                                <span class="textNav">Locations</span>
                            </a>
                        }
                        else
                        {
                            <a href="/locations">
                                <span style="left:4px;" class="fa fa-map-marker"></span>
                                <span class="textNav">Locations</span>
                            </a>
                        }
                    </li>
                    <li ng-click="onClickOfCompanies()" ng-class="{active:companies}">

                        @if (Model.IsDebugMode == false)
                        {
                            <a href="/@latAppName/companies">
                                <span class="fa fa-bank naviIconStyle2"></span>
                                <span class="textNav">Companies</span>
                            </a>
                        }
                        else
                        {
                            <a href="/companies">
                                <span class="fa fa-bank naviIconStyle2"></span>
                                <span class="textNav">Companies</span>
                            </a>
                        }
                    </li>

                    <li ng-click="onClickOfHelp()" ng-class="{active:help}">
                        @if (Model.IsDebugMode == false)
                        {
                            <a href="/@latAppName/helpNResources">
                                <span class="fa fa fa-question naviIconStyle3"></span><span class="textNav">Help & Resources</span>
                            </a>
                        }
                        else
                        {
                            <a href="/helpNResources">
                                <span class="fa fa fa-question naviIconStyle3"></span><span class="textNav">Help & Resources</span>
                            </a>
                        }
                    </li>
                    @if (Model.UserInfo.IsAdminUser && Convert.ToBoolean(ConfigurationManager.AppSettings["IsAdminVisible"]) == true)
                    {
                        <li ng-click="onClickOfAdmin()" ng-class="{active:admin}">
                            @if (Model.IsDebugMode == false)
                            {
                                <a href="/@latAppName/AdminUsers">
                                    <span class="fa fa fa-user naviIconStyle"></span><span class="textNav">Manage Users</span>
                                </a>
                            }
                            else
                            {
                                <a href="/AdminUsers">
                                    <span class="fa fa fa-user naviIconStyle"></span><span class="textNav">Manage Users</span>
                                </a>
                            }
                        </li>
                        <li ng-click="onClickOfCityStandards()" ng-class="{active:cityStandards}">
                            @if (Model.IsDebugMode == false)
                            {
                                <a href="/@latAppName/cityStandards">
                                    <span class="fa fa fa-globe naviIconStyle3"></span><span class="textNav">City Standards</span>
                                </a>
                            }
                            else
                            {
                                <a href="/cityStandards">
                                    <span class="fa fa fa-globe naviIconStyle3"></span><span class="textNav">City Standards</span>
                                </a>
                            }
                        </li>
                    }
                </ul>
            </div>
        </div>
        <div ng-show="showServLoader" class="ui-dialog-spinner-main"></div>
        @if (string.IsNullOrWhiteSpace(serviceTypeCode) && Model.UserInfo.UserServiceTypeList.Count > 1)
        {
            <div id="lightForSvcType" class="mainService_popup card" ng-class="{'pageLoad':serviceTypePopup}">
                <div>
                    <div class="mainPopupMessage">
                        <span class="mainPopupMessageBold">Option</span><br />
                        <span class="customPopupCont2">Please select service type to proceed.</span><br />
                    </div>
                    <br />
                    <div style="padding: 0 34px 25px 34px">
                        <label class="serviceTypeNew">Service type:</label>
                        <select class="custom-select" ng-init="serviceType='@Model.UserInfo.UserServiceTypeList[0].Name'" ng-model="serviceType">
                            @{
                                var count = 0;
                                foreach (var serviceType in Model.UserInfo.UserServiceTypeList)
                                {
                                    if (count == 0)
                                    {
                                        count++;
                                        <option ng-selected="true">@serviceType.Name</option>
                                    }
                                    else
                                    {
                                        <option>@serviceType.Name</option>
                                    }
                                }
                            }
                        </select>

                    </div>
                </div>
                <div class="search-btn-holder" style="text-align: center;">
                    <span class="warningError" style="margin-left: -105px;margin-top: -20px;" ng-show="serviceType !== 'Atm'">This service type is currently not available.</span>
                    <button class="btn btn-primary" ng-click="onClickFlag=true;onClickOfApply(@userInfoJson, serviceType, @JsonConvert.SerializeObject(Model.TemplatePage, Formatting.Indented,
                                                                                                                              new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }))" style="margin-left: 12px" ng-disabled="serviceType !== 'Atm'">
                        Apply
                    </button>
                </div>
            </div>
            <div id="fadeForSvcType" class="black_overlayService" ng-class="{'pageLoad':serviceTypePopup}"></div>
        }
        else if (string.IsNullOrWhiteSpace(serviceTypeCode) == false)
        {
            <span ng-init="onClickFlag=false;onClickOfApply(@userInfoJson, @JsonConvert.SerializeObject(serviceTypeCode, Formatting.Indented,
                                                                               new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }), @JsonConvert.SerializeObject(Model.TemplatePage, Formatting.Indented,
                                                                                                                                                                                    new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }))"></span>
        }
        else
        {
            <span ng-init="onClickOfApply(@userInfoJson, @JsonConvert.SerializeObject(Model.UserInfo.UserServiceTypeList[0].Name, Formatting.Indented,
                                                             new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }), @JsonConvert.SerializeObject(Model.TemplatePage, Formatting.Indented,
                                                                                                                                                                  new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }))"></span>
        }
        <div ng-include data-src="'App/QuickTour/viewQuickTour.html'"></div>
        <div class="col-lg-9" ng-view ng-show="showViewForNavigations">
        </div>
    </div>
    <script type="text/javascript">
        // Main function that load the dynamic sequential loading of the JS files.
        function loadJsFilesSequentially(scriptsCollection, startIndex, librariesLoadedCallback) {
            if (scriptsCollection[startIndex]) {
                var fileref = document.createElement('script');
                fileref.setAttribute("type", "text/javascript");
                fileref.setAttribute("src", scriptsCollection[startIndex]);
                fileref.onload = function () {
                    startIndex = startIndex + 1;
                    loadJsFilesSequentially(scriptsCollection, startIndex, librariesLoadedCallback);
                };
                document.getElementsByTagName("head")[0].appendChild(fileref);
            }
            else {
                librariesLoadedCallback();
            }
        }
        // An array of scripts you want to load in order
        var scriptLibrary = [];
        scriptLibrary.push("Scripts/jquery-2.1.4.min.js");
        scriptLibrary.push("Scripts/jquery.signalR-2.0.0.min.js");
        scriptLibrary.push("signalr/hubs");
        scriptLibrary.push("Scripts/datepicker/moment.js");
        scriptLibrary.push("Scripts/angular.min.js");
        scriptLibrary.push("Scripts/angular-route.min.js");
        scriptLibrary.push("Scripts/angular-resource.min.js");
        scriptLibrary.push("Scripts/angular-ui-router.min.js");
        scriptLibrary.push("Scripts/angular-ui/ui-bootstrap-tpls.min.js");
        scriptLibrary.push("Scripts/datepicker/jquery.datetimepicker.js");
        scriptLibrary.push("Scripts/bootstrap.js");
        scriptLibrary.push("Scripts/less-1.5.1.min.js");
        scriptLibrary.push("Scripts/components.js");
        scriptLibrary.push("http://maps.googleapis.com/maps/api/js?sensor=false&language=en");
        scriptLibrary.push("http://code.highcharts.com/highcharts.js");
        scriptLibrary.push("Scripts/maps.js");
        scriptLibrary.push("App/lat-modules.js");
        scriptLibrary.push("App/ServiceRepositry/latUserReportDateSvc.js");
        scriptLibrary.push("App/ServiceRepositry/latUserInfoSvc.js");
        scriptLibrary.push("App/ServiceRepositry/latErrorSummarySvc.js");
        scriptLibrary.push("App/ServiceRepositry/latCertifySvc.js");
        scriptLibrary.push("App/ServiceRepositry/latLocationSvc.js");
        scriptLibrary.push("App/ServiceRepositry/latUploadHistorySvc.js");
        scriptLibrary.push("App/ServiceRepositry/latCompaniesDetailsSvc.js");
        scriptLibrary.push("App/ServiceRepositry/latHelpNResourcesSvc.js");
        scriptLibrary.push("App/ServiceRepositry/latCityStandardsSvc.js");
        scriptLibrary.push("App/ServiceRepositry/latManageUserSvc.js");
        scriptLibrary.push("App/homeCtrl.js");
        scriptLibrary.push("App/Dashboard/dashboardCtrl.js");
        scriptLibrary.push("App/Locations/locationCtrl.js");
        scriptLibrary.push("App/Errors/errorsCtrl.js");
        scriptLibrary.push("App/Directives/knobDirective.js");
        scriptLibrary.push("App/UploadHistory/uploadHistoryCtrl.js");
        scriptLibrary.push("App/Companies/companiesCtrl.js");
        scriptLibrary.push("App/HelpNresources/helpNResourcesCtrl.js");
        scriptLibrary.push("App/CityStandards/cityStandardsCtrl.js");
        scriptLibrary.push("App/Admin/adminUsersCtrl.js");
        scriptLibrary.push("App/QuickTour/viewQuickTourCtrl.js");

        // Pass the array of scripts you want loaded in order and a callback function to invoke when its done.
        loadJsFilesSequentially(scriptLibrary, 0, function () {
        });
    </script>
</body>

</html>

我尝试将脚本部分放在head部分,但没有成功。

请帮助,如果我遗漏的东西会使它在IE浏览器中始终工作,即不需要一直刷新它。

此致 嗡

0 个答案:

没有答案