api-templates: only show directive inputs/outputs if there are some

This commit is contained in:
Peter Bacon Darwin 2015-11-03 23:32:56 +00:00
parent b5744c813a
commit 26320160f9
2 changed files with 9 additions and 7 deletions

View File

@ -61,5 +61,7 @@ function getDecoratorValues(classDecoratorValues, memberDecoratorName, members)
} }
}); });
if (Object.keys(decoratorValues).length) {
return decoratorValues; return decoratorValues;
} }
}

View File

@ -11,11 +11,11 @@
code {$ selector $} code {$ selector $}
{% endfor %} {% endfor %}
{% if doc.inputs.length %} {% if doc.inputs %}
.l-main-section .l-main-section
h2 Inputs h2 Inputs
.l-sub-section .l-sub-section{% for binding, property in doc.inputs %}
h3.input {% for binding, property in doc.inputs %} h3.input
code {$ property.bindingName | dashCase $} code {$ property.bindingName | dashCase $}
|  bound to  |  bound to 
code {$ property.memberDoc.classDoc.name $}.{$ property.propertyName $} code {$ property.memberDoc.classDoc.name $}.{$ property.propertyName $}
@ -24,11 +24,11 @@
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if doc.ouputs.length %} {% if doc.outputs %}
.l-main-section .l-main-section
h2 Outputs h2 Outputs
.l-sub-section .l-sub-section{% for binding, property in doc.outputs %}
h3.input {% for binding, property in doc.outputs %} h3.output
code {$ property.bindingName | dashCase $} code {$ property.bindingName | dashCase $}
|  bound to  |  bound to 
code {$ property.memberDoc.classDoc.name $}.{$ property.propertyName $} code {$ property.memberDoc.classDoc.name $}.{$ property.propertyName $}