How would one go about documenting a constant using ngDoc? I don't see any angular specific documentation for documenting values registered with .constant
, and the jsDoc syntax for constants doesn't seem to generate any actual docs when it's run through ngDoc.
Ex:
/**
* @constant
* @name WHITE
*
* @description
* The color white!
**/
module.constant( 'WHITE', '#fff' );
ngDocs currently doesn't provide a way to document constants. As you can see in its templating source code. There isnt relevant html_usage_*
method.
I document constants like this, it shows a APP_CONFIG as a module then.
/**
* @ngdoc object
* @name APP_CONFIG
* @description
* constant...
* @example
* APP_CONFIG is injectable as constant (as a service even to .config())
* <pre>
* (...) .config(function ($APP_CONFIG) {
* </pre>
*/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With