缩小 AngularJS 个应用程序问题

Minifying AngularJS application issues

我有一个用 AngularJS 和 Bootstrap 编写的应用程序运行良好,但是当我试图缩小它时我遇到了问题。

我的应用的 index.html 是:

<!DOCTYPE html>
<html lang="es-ES"  >
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Vebor Editor</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">


    <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0/angular-material.min.css">
   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<link rel="stylesheet" href="css/style.min.css">

</head>
    <body ng-app="editor"  ng-strict-di>
        <header ng-include="'views/header.html'"></header>
        <div class="container">
            <div ui-view></div>
        </div>
        <footer class="footer" ng-include="'views/footer.html'"></footer>
<script src="/lib/angular/angular.js"></script>
        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular-route.min.js"></script>
        <script src="https://cdn.rawgit.com/angular-ui/ui-router/0.2.18/release/angular-ui-router.min.js"></script>
        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular-resource.min.js"></script>
        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular-animate.min.js"></script>
        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular-aria.min.js"></script>
        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular-messages.min.js"></script>
        <script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0/angular-material.min.js"></script>
        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular-sanitize.min.js"></script>
        <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/2.5.0/ui-bootstrap-tpls.min.js"></script>
        <script src="/js/scripts.min.js"></script>
    </body>
</html>

我有 14 个不同的 js 文件,所以我不会在这里复制它们,如果您有任何需要,请告诉我。主 js 文件是这样的:

(function(){

    'use strict';
    angular.module('editor', [
        'ngMaterial', 'ngRoute',  'ngSanitize', 'ui.bootstrap', 'ui.router',
        'editor.mainControllers', 'editor.searchControllers', 'editor.classControllers', 'editor.contactController', 'editor.viewerController', 'editor.listingControllers',
        'editor.services', 'editor.serverCallsServices', 'editor.translationService'
    ]);
function config (...){...}
function run(...){...}
})();

首先,我使用 gulp 中的函数 uglify 生成带有 style.min.css 和 script.min.js 的分发项目。

其次,我手动将 js 文件的全部内容复制到一个唯一的 script.js 中,然后使用外部工具将其缩小。 (即使使用未缩小的统一文件也发生了我遇到的问题)。

问题

这个问题解释起来很简单。页面未加载,似乎是一个无限循环,因为控制台什么也没显示,也没有 DOM。如果我重新加载页面它仍然无法正常工作,我必须关闭选项卡并再次打开它。

由于没有浏览器的信息,我很迷茫。你知道为什么会这样吗?或者也许我可以使用一些东西来尝试发现问题?

我已经知道 Angular 中的注入问题,并且我的所有控制器都配备了正确的 $inject。

如果我是你,我会尝试以不同的顺序加载文件。