首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用生成器-ngdoc生成吞咽角文档

用生成器-ngdoc生成吞咽角文档
EN

Stack Overflow用户
提问于 2018-03-19 21:57:06
回答 1查看 144关注 0票数 0

我很难为基于吞咽角的项目生成文档:我正在使用这个生成器在我的项目发电机-ngdoc (基于dgeni)中生成一个docs文件夹。每当我打开一个组件的文档,我就会得到这个错误。

代码语言:javascript
复制
angular.js:68 Uncaught Error: [$injector:nomod] Module 'appModule' is 
not available! You either misspelled the module name or forgot to load 
it. If registering a module ensure that you specify the dependencies 
as the second argument.
http://errors.angularjs.org/1.5.9/$injector/nomod?p0=appModule
  at angular.js:68
  at angular.js:2127
  at ensure (angular.js:2051)
  at Object.module (angular.js:2125)
  at modules.js:5
  at modules.js:20

modules.js中有以下代码:

代码语言:javascript
复制
(function () {
  'use strict';

  angular
    .module('appModule')
    .config(config);

  config.$inject = ['$logProvider', 'ngToastProvider'];

  function config($logProvider, ngToastProvider) {
    // Enable log
    $logProvider.debugEnabled(true);
    ngToastProvider.configure({
      animation: 'slide',// or 'fade'
      verticalPosition: 'bottom',
      horizontalPosition: 'left'
    });
  }

})();

/* global moment:false */
(function() {
  'use strict';
  angular
    .module('appModule')
    .constant('moment', moment);

})();

/**
 *
 * @ngdoc module
 * @name appModule
 * @module appModule
 * @packageName agirc-arrco
 * @description
 * This is a sample module.
 *
 **/
(function () {
  'use strict';

  angular
    .module('appModule', ['ngAnimate', 'ngCookies', 'ngTouch', 
'ngSanitize', 'ngMessages', 'ngAria', 'ngResource', 'ui.router', 
'ui.bootstrap', 'agr.components.stepper', 'agr.components.toggle',
  'agr.components.accordionrow', 'angularMoment', 
'agr.components.header', 'agr.filters.period', 'agr.directives.limit- 
 to', 'env.config']);

  })();

我不确定,但似乎dgeni在模块声明本身之前包含了模块配置。有什么解决办法吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-03-20 01:40:18

我找到了解决方案:模块文件应该单独添加到gulp/module.js中的gulp.src任务中

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49373013

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档