Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
grunt构建后AngularJS应用程序中断_Angularjs_Gruntjs_Yeoman_Grunt Contrib Uglify - Fatal编程技术网

grunt构建后AngularJS应用程序中断

grunt构建后AngularJS应用程序中断,angularjs,gruntjs,yeoman,grunt-contrib-uglify,Angularjs,Gruntjs,Yeoman,Grunt Contrib Uglify,只要我在开发模式下工作并运行grunt服务,我的AngularJS应用程序就可以正常工作。但是,当我构建用于生产的应用程序时,我的应用程序会出现nomod错误: 错误:[$injector:nomod]模块“angular-md5”不可用!你 模块名称拼写错误或忘记加载。如果注册 模块确保将依赖项指定为第二个 争论 我的app.js看起来像 有棱角的 .module('spidergWebClientApp'[ “拨动开关”, “ui.bootstrap”, “ui.tree”, 'ui.sel

只要我在开发模式下工作并运行grunt服务,我的AngularJS应用程序就可以正常工作。但是,当我构建用于生产的应用程序时,我的应用程序会出现
nomod
错误:

错误:[$injector:nomod]模块“angular-md5”不可用!你 模块名称拼写错误或忘记加载。如果注册 模块确保将依赖项指定为第二个 争论

我的app.js看起来像 有棱角的 .module('spidergWebClientApp'[ “拨动开关”, “ui.bootstrap”, “ui.tree”, 'ui.select2', “ngGrid”, “可编辑”, "主题服务",, “主题.指令”, “theme.ui面板”, “theme.ui模态”, '主题.ui警报', “theme.ui进度条”, '主题.ui分页', “主题.形式指令”, “主题.表单验证”, '主题.表格ng网格', “theme.pages控制器”, “theme.dashboard”, “theme.templates”, '主题.模板覆盖', “ngCookies”, “ngResource”, “消毒”, "ngRoute",, “ngAnimate”, “存储”, '角度-md5', 'spiderg.login令牌服务', 'spiderg.api拦截器', “spiderg.user服务”, “spiderg.documents数据服务”, “蜘蛛网注册服务”, “spiderg.mailbox服务”, “spiderg.forms数据过滤器”, “spiderg.forms控制器”, “spiderg.collaboration controller”, “蜘蛛导航控制器”, “spiderg.notifications控制器”, “spiderg.messages控制器”, “spiderg.login控制器”, '蜘蛛注册控制器', “spiderg.user controller”, “spiderg.socket url生成器”, “spiderg.documents网格控制器”, “spiderg.mailbox控制器”, “蜘蛛模式控制器”, “spiderg.exception控制器”, "ngile",, “btford.socket io”, “消毒” ]) .财务总监(…) .config(…) 下面是我的index.html

小于={};less.env=‘发展’;
  • SpideG&复制;2014年

我尝试过使用
ng annotate
。我在整个应用程序中都使用了DI的数组表示法。

你确定你已经将相应的JS文件导入到index.html中的
angular-md5
中了吗?是的,我已经包含了相应的JS文件。你可以发布你的index.html吗?我已经编辑了这篇文章来添加index.html。你是否尝试过:
build:JS({.tmp,app})脚本/vendor.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(..)
    <!-- 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 -->