From 3fedcc95257feeadebaa025670de1ef9498d0372 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Tue, 3 Nov 2015 12:26:56 +0000 Subject: [PATCH] api-templates: don't show annotations block in classes if there is an empty list Previously the block would be hidden only if the annotations property was falsy, now it is also hidden if the property is also an empty array --- .../angular.io-package/templates/class.template.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/api-builder/angular.io-package/templates/class.template.html b/public/api-builder/angular.io-package/templates/class.template.html index 05a2044080..4c049a3764 100644 --- a/public/api-builder/angular.io-package/templates/class.template.html +++ b/public/api-builder/angular.io-package/templates/class.template.html @@ -15,7 +15,7 @@ p.location-badge. {$ doc.description | indentForMarkdown(2) | trimBlankLines $} {% endif -%} -{%- if doc.decorators %} +{%- if doc.decorators.length %} .l-main-section h2 Annotations {%- for decorator in doc.decorators %} @@ -25,10 +25,10 @@ p.location-badge. code. @{$ decorator.name $}{$ paramList(decorator.arguments) | indent(8, false) $} {% endfor %} -{% endif -%} +{%- endif %} -{%- if doc.constructorDoc or doc.members.length -%} +{% if doc.constructorDoc or doc.members.length -%} .l-main-section h2 Members