api-builder: show metadata details on decorator docs

This commit is contained in:
Peter Bacon Darwin
2016-09-08 23:09:55 +01:00
committed by Igor Minar
parent a2089c5b4f
commit 13878efca7
2 changed files with 37 additions and 5 deletions
@@ -15,16 +15,36 @@ include {$ relativePath(doc.path, '_util-fns') $}
div(layout="row" layout-xs="column" class="row-margin ng-cloak")
div(flex="20" flex-xs="100")
h2(class="h2-api-docs") Variable Export
h2(class="h2-api-docs") Description
div(class="code-links" flex="80" flex-xs="100")
pre.prettyprint.no-bg
code.
export {$ doc.name $}(options : {@link {$ doc.decoratorType $} {$ doc.decoratorType | escape $}}){$ params.returnType(doc.returnType) $}
:marked
{%- if not doc.notYetDocumented %}
{$ doc.description | indentForMarkdown(6) | trimBlankLines $}
{% endif %}
{% if doc.metadataDoc and doc.metadataDoc.members.length %}
div(layout="row" layout-xs="column" class="metadata" class="row-margin ng-cloak")
div(flex="20" flex-xs="100")
h2(class="h2-api-docs") Metadata Properties
div(class="code-links" flex="80" flex-xs="100")
{% for metadata in doc.metadataDoc.members %}{% if not metadata.internal %}
a(name="{$ metadata.name $}-anchor" class="anchor-offset")
pre(class="prettyprint no-bg" ng-class="{ 'anchor-focused': appCtrl.isApiDocMemberFocused('{$ metadata.name $}') }")
code(class="api-doc-code").
{$ metadata.name $}{$ params.paramList(metadata.parameters) | indent(8, false) | trim $}{$ params.returnType(metadata.returnType) $}
:marked
{%- if not metadata.notYetDocumented %}
{$ metadata.description | indentForMarkdown(6) | replace('### Example', '') | replace('## Example', '') | replace('# Example', '') | trimBlankLines $}
{% endif -%}
{% if not loop.last %}
.hr(class="hr-margin")
{% endif %}
{% endif %}{% endfor %}
{% endif %}
p.location-badge.
exported from {@link {$ doc.moduleDoc.id $} {$doc.moduleDoc.id $} } defined in {$ github.githubViewLink(doc) $}