angular-jsdoc
angular-jsdoc copied to clipboard
Controller properties not being displayed in generated docs
In the example files for documenting a controller:
/**
* @property {Hash} _objects collection og objects that belongs to this map
*/
this._objects = {};
but the output.js file doesn't contain this property.
Any advice for documenting controller properties or/and why the example doesn't work?
Could you please provide the whole code of the controller?
If you used @name for the parent docblock it will ignore all nested docblocks. Post your objects docblock.
@Zemke @reloaded this is the case on your example map-controller: https://github.com/allenhwkim/angular-jsdoc/blob/master/sample-codes/ngmap/map-controller.js - The output: https://rawgit.com/allenhwkim/angular-jsdoc/master/angular-template/docs/ngmap.MapController.html doesn't show "_objects" in the generated docs
It will work if you add the "@memberof" annotation like so:
/**
* @memberof MapController
* @property {Hash} _objects collection og objects that belongs to this map
*/
this._objects = {};
The example seems to be missing it and that's basically it.
I've been documenting a quite complex AnguarJS/NodeJS/Browserify project for the last few days and any visibility problems went away when I realized that I need to add a proper "@memberof" to every entry, for example:
/**
* @memberof module_name
*/
for top level entries
/**
*@memberof module_name.DirectiveName
*/
for entries nested in a directive, which has a "@name DirectiveName" and "@memberof module_name"
It's a basic parent-child relation from what I figured. It's a bit annoying to have to add this to every inner part you want to document, but I guess writing a parser that would know where it currently is (inside or outside of a function/class, etc.) would be a lot of work.
Maybe the docs should have a short notice about it?