Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to place controllers into modules with ngdoc

I use the grunt grunt-ngdocs module and this is the the code which creates the documentation.

ngdocs: {
            all: app_files,
            scripts: ['angular.js']
        }

I have a module called starter and two controllers: controllerA, controllerB

/**
  * 
  * @ngdoc object
  * @name controllerA

  * @description  ...
  */

/**
  * 
  * @ngdoc object
  * @name controllerB

  * @description  ...
  */

When running the documentation generator these controllers are shown as modules.

How do i write it in the ngdoc markup that both of them are connected to module starter?

contollerA and controllerB are in different files.

like image 397
David Michael Gang Avatar asked Feb 11 '23 20:02

David Michael Gang


1 Answers

Usually you write ngdoc this way for controllers:

@name moduleName.controller:ControllerName

In your case you can write:

/**
 * @ngdoc controller
 * @name starter.controller:controllerA
 *
 * ....
*/
like image 184
DevTrong Avatar answered Feb 14 '23 11:02

DevTrong