grunt-ngdoc 没有为我的 ngdoc 文档呈现示例
grunt-ngdoc is not rendering examples for my ngdoc documentation
我正在尝试获取一个基本示例,以便在我的 Angular 项目中使用 ngDoc。
这是一个例子:
/**
* @ngdoc directive
* @name ui.components.uiRepeat
* @description
*
* Place this attribute directive on any element that has an `ng-repeat` on it, and it will add CSS classes
* for the different element states in the repeat set.
*
* @example
<example name="uiRepeat-directive">
<file name="index.html">
<div ng-repeat="item in items" ui-repeat="item">
</div>
</file>
</example>
*/
编译文档时会显示 示例 标题,但没有嵌入示例。
这里是link编译文档:
http://thinkingmedia.github.io/thinkingmedia-ui/#/api/ui.components.uiRepeat
这里有一个 link 到 Angular 的文档,展示了示例的外观:
https://docs.angularjs.org/api/ng/directive/ngClick
我不能,我的 ngDoc 有什么问题?
尝试用模块属性替换示例标签中的名称属性
/**
* @ngdoc directive
* @name ui.components.uiRepeat
* @description
*
* Place this attribute directive on any element that has an `ng-repeat` on it, and it will add CSS classes
* for the different element states in the repeat set.
*
* @example
<example module="ui">
<file name="index.html">
<div ng-repeat="item in items" ui-repeat="item">
</div>
</file>
</example>
*/
并且不要忘记将路径添加到此模块并将指令添加到您的 Gruntfile
我正在尝试获取一个基本示例,以便在我的 Angular 项目中使用 ngDoc。
这是一个例子:
/**
* @ngdoc directive
* @name ui.components.uiRepeat
* @description
*
* Place this attribute directive on any element that has an `ng-repeat` on it, and it will add CSS classes
* for the different element states in the repeat set.
*
* @example
<example name="uiRepeat-directive">
<file name="index.html">
<div ng-repeat="item in items" ui-repeat="item">
</div>
</file>
</example>
*/
编译文档时会显示 示例 标题,但没有嵌入示例。
这里是link编译文档:
http://thinkingmedia.github.io/thinkingmedia-ui/#/api/ui.components.uiRepeat
这里有一个 link 到 Angular 的文档,展示了示例的外观:
https://docs.angularjs.org/api/ng/directive/ngClick
我不能,我的 ngDoc 有什么问题?
尝试用模块属性替换示例标签中的名称属性
/**
* @ngdoc directive
* @name ui.components.uiRepeat
* @description
*
* Place this attribute directive on any element that has an `ng-repeat` on it, and it will add CSS classes
* for the different element states in the repeat set.
*
* @example
<example module="ui">
<file name="index.html">
<div ng-repeat="item in items" ui-repeat="item">
</div>
</file>
</example>
*/
并且不要忘记将路径添加到此模块并将指令添加到您的 Gruntfile