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)
}
});
return decoratorValues;
if (Object.keys(decoratorValues).length) {
return decoratorValues;
}
}

View File

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