如何使用ngDoc记录常量?我没有看到任何用于记录注册值的角度特定文档.constant,并且常量的jsDoc语法在通过ngDoc运行时似乎不会生成任何实际文档.
例如:
/**
* @constant
* @name WHITE
*
* @description
* The color white!
**/
module.constant( 'WHITE', '#fff' );
Kou*_*kis -2
应该是@const
/** @const */ var MY_BEER = 'stout';
/**
* My namespace's favorite kind of beer.
* @const {string}
*/
mynamespace.MY_BEER = 'stout';
/** @const */ MyClass.MY_BEER = 'stout';
/**
* Initializes the request.
* @const
*/
mynamespace.Request.prototype.initialize = function() {
// This method cannot be overridden in a subclass.
};
Run Code Online (Sandbox Code Playgroud)
请参阅常量部分http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml#Constants和注释部分http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml?showone =评论#评论了解更多信息
| 归档时间: |
|
| 查看次数: |
2403 次 |
| 最近记录: |