2015-10-29 2 views
2

Я пытаюсь получить базовый пример для работы с помощью ngDoc для моего проекта Angular.grunt-ngdoc не показывает примеры для моей документации по 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> 
*/ 

Когда документация составлена ​​на пример заголовка показан, но не внедренный пример.

Вот ссылка на собранную документацию:

http://thinkingmedia.github.io/thinkingmedia-ui/#/api/ui.components.uiRepeat

Вот ссылка угловыми документации показывает, что пример должен выглядеть следующим образом:

https://docs.angularjs.org/api/ng/directive/ngClick

Я не могу что неправильно с моим ngDoc?

ответ

5

Попробуйте заменить имя атрибута в примере тега атрибутом модуля

/** 
* @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

+0

+1 Большое спасибо за ответ на этот вопрос. Я бы не подумал об этом сам. Я даю вам еще 100 репутации в качестве подарка спасибо. – cgTag

Смежные вопросы