-
Couldn't load subscription status.
- Fork 194
Description
It's been a while, but I'll be coming back to dox!
Question: does dox look at the comments when it can't infer from the code? Can we make it prioritize the comments over the code?
For example, I have
/**
* This is the HTML entry point. This is what fires the app running.
*
* @class app
*
* @example
* <app />
*/
angular.module('app').directive('app', function() {
return {
template: require('./app.html'),
restrict: 'E', // custom element only, not attribute directive.
scope: {}, // use isolate scope for custom elements.
transclude: false, // if true, means the custom element can have children. Place the children anywhere inside the template using ng-transclude.
controller: AppCtrl,
controllerAs: 'app',
bindToController: true, // always bind to controller with isolate-scope element directives.
};
});Since Angular directives aren't a standard JS thing, I thought I'd just use the @class jsdoc directive to document it (in Angular 2 they are classes anyways). I'm using dox 0.8.1 in dox-foundation, but the class docs don't show up. For example, here's what an actual ES6 class doc looks like in dox-foundation:
But, here's what happens with the above sample code:
which leads me to believe that the JSON that dox returns to dox-foundation is different in that case, which is why dox-foundation renders it differently. Is there (maybe we can add) an option to prioritize comments over code?