在grunt构建之后AngularJS应用程序中断

时间:2015-05-31 20:46:42

标签: angularjs gruntjs yeoman grunt-contrib-uglify

我的AngularJS应用程序工作正常,因为我在开发模式下工作并运行grunt服务。但是,当我构建生产应用程序时,我的应用程序因nomod错误而错误:

  

错误:[$ injector:nomod]模块' angular-md5'不可用!您   要么错误拼写模块名称,要么忘记加载它。如果注册   模块确保您将依赖项指定为第二个   参数。

我的app.js看起来像

angular
  .module('spidergWebClientApp', [
    'toggle-switch',
    'ui.bootstrap',
    'ui.tree',
    'ui.select2',
    'ngGrid',
    'xeditable',
    'theme.services',
    'theme.directives',
    'theme.ui-panels',
    'theme.ui-modals',
    'theme.ui-alerts',
    'theme.ui-progressbars',
    'theme.ui-paginations',
    'theme.form-directives',
    'theme.form-validation',
    'theme.tables-ng-grid',
    'theme.pages-controllers',
    'theme.dashboard',
    'theme.templates',
    'theme.template-overrides',
    'ngCookies',
    'ngResource',
    'ngSanitize',
    'ngRoute',
    'ngAnimate',
    'ngStorage',
    'angular-md5',
    'spiderg.login-token-service',
    'spiderg.api-interceptor',
    'spiderg.user-service',
    'spiderg.documents-data-service',
    'spiderg.registration-service',
    'spiderg.mailbox-service',
    'spiderg.forms-data-filter',
    'spiderg.forms-controller',
    'spiderg.collaboration-controller',
    'spiderg.navigation-controller',
    'spiderg.notifications-controller',
    'spiderg.messages-controller',
    'spiderg.login-controller',
    'spiderg.registration-controller',
    'spiderg.user-controller',
    'spiderg.socket-url-generator',
    'spiderg.documents-grid-controller',
    'spiderg.mailbox-controller',
    'spiderg.modal-controller',
    'spiderg.exception-controller',
    'ngIdle',
    'btford.socket-io',
    'ngSanitize'
  ])
  .controller(...)
  .config(..)

以下是我的index.html

    <!-- bower:css -->
    <link rel="stylesheet" href="../bower_components/seiyria-bootstrap-slider/dist/css/bootstrap-slider.min.css" />
    <link rel="stylesheet" href="../bower_components/angular-ui-tree/dist/angular-ui-tree.min.css" />
    <link rel="stylesheet" href="../bower_components/angular-toggle-switch/angular-toggle-switch.css" />
    <link rel="stylesheet" href="../bower_components/ng-grid/ng-grid.css" />
    <link rel="stylesheet" href="../bower_components/angular-xeditable/dist/css/xeditable.css" />
    <link rel="stylesheet" href="../bower_components/select2/select2.css" />
    <link rel="stylesheet" href="../bower_components/jScrollPane/style/jquery.jscrollpane.css" />
    <link rel="stylesheet" href="../bower_components/pnotify/pnotify.core.css" />
    <link rel="stylesheet" href="../bower_components/pnotify/pnotify.buttons.css" />
    <link rel="stylesheet" href="../bower_components/pnotify/pnotify.history.css" />
    <link rel="stylesheet" href="../bower_components/ng-tags-input/ng-tags-input.min.css" />
    <link rel="stylesheet" href="../bower_components/pickadate/lib/themes/default.css" />
    <link rel="stylesheet" href="../bower_components/pickadate/lib/themes/default.date.css" />
    <link rel="stylesheet" href="../bower_components/pickadate/lib/themes/default.time.css" />
    <link rel="stylesheet" href="../bower_components/angular-ui-select/dist/select.css" />
    <!-- endbower -->
    <link rel='stylesheet' type='text/css' href='assets/fonts/glyphicons/css/glyphicons.min.css' /> 
    <link rel='stylesheet' type='text/css' href='assets/plugins/icheck/all.css' /> 
    <link rel='stylesheet' type='text/css' href='assets/plugins/form-multiselect/css/multi-select.css' /> 
    <link rel='stylesheet' type='text/css' href='assets/plugins/form-fseditor/fseditor.css' /> 
    <link rel='stylesheet' type='text/css' href='assets/plugins/form-tokenfield/bootstrap-tokenfield.css' /> 
    <link rel='stylesheet' type='text/css' href='assets/plugins/datepaginator/bootstrap-datepaginator.css' /> 
    <link rel='stylesheet' type='text/css' href='assets/plugins/jquery-fileupload/css/jquery.fileupload-ui.css' /> 
    <link rel='stylesheet' type='text/css' href='assets/plugins/bootstro.js/bootstro.min.css' /> 
    <link rel='stylesheet' type='text/css' href='assets/plugins/progress-skylo/skylo.css' /> 
    <link rel='stylesheet' type='text/css' href='assets/plugins/jcrop/css/jquery.Jcrop.min.css' /> 
    <link rel='stylesheet' type='text/css' href='assets/plugins/form-daterangepicker/daterangepicker-bs3.css' /> 
    <link rel='stylesheet' type='text/css' href='assets/plugins/form-markdown/css/bootstrap-markdown.min.css' /> 
    <link rel='stylesheet' type='text/css' href='assets/plugins/codeprettifier/prettify.css' />
    <link rel='stylesheet' type='text/css' href='assets/plugins/form-select2/select2.css' />
    <link rel='stylesheet' type='text/css' href='assets/plugins/fullcalendar/fullcalendar.css' />
    <!-- endbuild -->

    <!-- build:css({.tmp,app}) assets/css/main.css -->
      <link rel="stylesheet" href="assets/css/main.css">
      <link rel="stylesheet" href="assets/css/styles.css">
    <!-- endbuild -->

    <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.1.318/styles/kendo.common.min.css" />
    <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.1.318/styles/kendo.blueopal.min.css" />

    <!-- prochtml:remove:dist -->
    <script type="text/javascript">less = {}; less.env = 'development';</script>
    <script type="text/javascript" src="assets/plugins/misc/less.js"></script>
    <!-- /prochtml -->




</head>

<body class=""
  ng-app="spidergWebClientApp"
  ng-controller="MainController"
  ng-class="{
              'static-header': !style_fixedHeader,
              'focusedform': style_fullscreen,
              'layout-horizontal': style_layoutHorizontal,
              'fixed-layout': style_layoutBoxed,
              'collapse-leftbar': style_leftbarCollapsed && !style_leftbarShown,
              'show-rightbar': style_rightbarCollapsed,
              'show-leftbar': style_leftbarShown
            }"
  ng-click="hideSearchBar();hideHeaderBar();"
  ng-cloak
>




    <footer role="contentinfo">
        <div class="clearfix">
            <ul class="list-unstyled list-inline pull-left">
                <li>SpideG &copy; 2014</li>
            </ul>
            <button class="pull-right btn btn-default btn-xs hidden-print" back-to-top style="padding: 1px 10px;"><i class="fa fa-angle-up"></i></button>
        </div>
    </footer>

</div>

    <!-- build:js scripts/vendor.js -->
    <!-- bower:js -->
    <script src="../bower_components/es5-shim/es5-shim.js"></script>
    <script src="../bower_components/modernizr/modernizr.js"></script>
    <script src="../bower_components/jquery/dist/jquery.js"></script>
    <script src="../bower_components/underscore/underscore.js"></script>
    <script src="../bower_components/angular/angular.js"></script>
    <script src="../bower_components/angular-resource/angular-resource.js"></script>
    <script src="../bower_components/angular-cookies/angular-cookies.js"></script>
    <script src="../bower_components/angular-sanitize/angular-sanitize.js"></script>
    <script src="../bower_components/angular-route/angular-route.js"></script>
    <script src="../bower_components/angular-animate/angular-animate.js"></script>
    <script src="../bower_components/bootstrap/dist/js/bootstrap.js"></script>
    <script src="../bower_components/seiyria-bootstrap-slider/js/bootstrap-slider.js"></script>
    <script src="../bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
    <script src="../bower_components/jquery.ui/ui/jquery.ui.core.js"></script>
    <script src="../bower_components/jquery.ui/ui/jquery.ui.widget.js"></script>
    <script src="../bower_components/jquery.ui/ui/jquery.ui.mouse.js"></script>
    <script src="../bower_components/jquery.ui/ui/jquery.ui.draggable.js"></script>
    <script src="../bower_components/jquery.ui/ui/jquery.ui.resizable.js"></script>
    <script src="../bower_components/jquery.slimscroll/jquery.slimscroll.min.js"></script>
    <script src="../bower_components/jquery.easing/js/jquery.easing.js"></script>
    <script src="../bower_components/flot/jquery.flot.js"></script>
    <script src="../bower_components/flot/jquery.flot.stack.js"></script>
    <script src="../bower_components/flot/jquery.flot.pie.js"></script>
    <script src="../bower_components/flot/jquery.flot.resize.js"></script>
    <script src="../bower_components/flot.tooltip/js/jquery.flot.tooltip.js"></script>
    <script src="../bower_components/angular-ui-tree/dist/angular-ui-tree.js"></script>
    <script src="../bower_components/moment/moment.js"></script>
    <script src="../bower_components/jqvmap/jqvmap/jquery.vmap.js"></script>
    <script src="../bower_components/jqvmap/jqvmap/maps/jquery.vmap.world.js"></script>
    <script src="../bower_components/jqvmap/jqvmap/data/jquery.vmap.sampledata.js"></script>
    <script src="../bower_components/angular-toggle-switch/angular-toggle-switch.min.js"></script>
    <script src="../bower_components/ng-grid/build/ng-grid.js"></script>
    <script src="../bower_components/angular-xeditable/dist/js/xeditable.js"></script>
    <script src="../bower_components/select2/select2.js"></script>
    <script src="../bower_components/angular-ui-select2/src/select2.js"></script>
    <script src="../bower_components/iCheck/icheck.min.js"></script>
    <script src="../bower_components/google-code-prettify/src/prettify.js"></script>
    <script src="../bower_components/bootbox.js/bootbox.js"></script>
    <script src="../bower_components/jquery-autosize/jquery.autosize.js"></script>
    <script src="../bower_components/gmaps/gmaps.js"></script>
    <script src="../bower_components/jquery.pulsate/jquery.pulsate.js"></script>
    <script src="../bower_components/jquery.knob/js/jquery.knob.js"></script>
    <script src="../bower_components/jquery.sparkline/index.js"></script>
    <script src="../bower_components/flow.js/dist/flow.js"></script>
    <script src="../bower_components/ng-flow/dist/ng-flow.js"></script>
    <script src="../bower_components/jScrollPane/script/jquery.mousewheel.js"></script>
    <script src="../bower_components/jScrollPane/script/mwheelIntent.js"></script>
    <script src="../bower_components/jScrollPane/script/jquery.jscrollpane.min.js"></script>
    <script src="../bower_components/enquire/dist/enquire.js"></script>
    <script src="../bower_components/shufflejs/dist/jquery.shuffle.js"></script>
    <script src="../bower_components/pnotify/pnotify.core.js"></script>
    <script src="../bower_components/pnotify/pnotify.buttons.js"></script>
    <script src="../bower_components/pnotify/pnotify.callbacks.js"></script>
    <script src="../bower_components/pnotify/pnotify.confirm.js"></script>
    <script src="../bower_components/pnotify/pnotify.desktop.js"></script>
    <script src="../bower_components/pnotify/pnotify.history.js"></script>
    <script src="../bower_components/pnotify/pnotify.nonblock.js"></script>
    <script src="../bower_components/ng-tags-input/ng-tags-input.min.js"></script>
    <script src="../bower_components/tv4/tv4.js"></script>
    <script src="../bower_components/objectpath/lib/ObjectPath.js"></script>
    <script src="../bower_components/angular-schema-form/dist/schema-form.js"></script>
    <script src="../bower_components/angular-schema-form/dist/bootstrap-decorator.js"></script>
    <script src="../bower_components/ngstorage/ngStorage.js"></script>
    <script src="../bower_components/angular-md5/angular-md5.js"></script>
    <script src="../bower_components/angular-base64/angular-base64.js"></script>
    <script src="../bower_components/ng-idle/angular-idle.js"></script>
    <script src="../bower_components/angular-socket-io/socket.js"></script>
    <script src="../bower_components/angular-strap/dist/angular-strap.js"></script>
    <script src="../bower_components/angular-strap/dist/angular-strap.tpl.js"></script>
    <script src="../bower_components/angular-schema-form-dynamic-select/angular-schema-form-dynamic-select.js"></script>
    <script src="../bower_components/pickadate/lib/picker.js"></script>
    <script src="../bower_components/pickadate/lib/picker.date.js"></script>
    <script src="../bower_components/pickadate/lib/picker.time.js"></script>
    <script src="../bower_components/angular-schema-form-datepicker/bootstrap-datepicker.min.js"></script>
    <script src="../bower_components/schema-form-datetimepicker/schema-form-datetimepicker.min.js"></script>
    <script src="../bower_components/angular-ui-select/dist/select.js"></script>
    <script src="../bower_components/angular-translate/angular-translate.js"></script>
    <script src="../bower_components/angular-schema-form-uiselect/ui-sortable.js"></script>
    <script src="../bower_components/angular-schema-form-uiselect/angular-underscore.js"></script>
    <script src="../bower_components/angular-schema-form-uiselect/bootstrap-uiselect.min.js"></script>
    <script src="../bower_components/ng-file-upload/ng-file-upload.js"></script>
    <script src="../bower_components/ng-file-upload-shim/ng-file-upload-shim.js"></script>
    <script src="../bower_components/angular-ui-utils/ui-utils.js"></script>
    <script src="../bower_components/schema-form-uiselect/schema-form-uiselect.min.js"></script>
    <script src="../bower_components/schema-form-strapselect/schema-form-strapselect.min.js"></script>
    <script src="../bower_components/angular-underscore/angular-underscore.js"></script>
    <!-- endbower -->

    <script type='text/javascript' src='assets/plugins/form-daterangepicker/daterangepicker.min.js'></script>
    <script type='text/javascript' src='assets/plugins/form-datepicker/js/bootstrap-datepicker.js'></script>
    <script type='text/javascript' src='assets/plugins/easypiechart/angular.easypiechart.js'></script> 
    <script type='text/javascript' src='assets/plugins/datepaginator/bootstrap-datepaginator.js'></script> 
    <script type='text/javascript' src='assets/plugins/form-multiselect/js/jquery.multi-select.min.js'></script> 
    <script type='text/javascript' src='assets/plugins/form-colorpicker/js/bootstrap-colorpicker.min.js'></script> 
    <script type='text/javascript' src='assets/plugins/form-fseditor/jquery.fseditor-min.js'></script> 
    <script type='text/javascript' src='assets/plugins/form-jasnyupload/fileinput.js'></script> 
    <script type='text/javascript' src='assets/plugins/Base64Utility/Base64Utility.js'></script> 
    <script type='text/javascript' src='assets/plugins/progress-skylo/skylo.js'></script>
    <script type='text/javascript' src='assets/plugins/bootstro.js/bootstro.min.js'></script>


    <!-- endbuild -->

我尝试过使用ng-annotate。我在整个应用程序中使用了数组符号来表示DI。

0 个答案:

没有答案
相关问题