angular-cn/aio/tools/transforms/templates/api/lib/descendants.html

14 lines
556 B
HTML
Raw Normal View History

{% macro renderDescendants(doc, docType, title='', recursed=false) %}
{% set descendants = doc.descendants | filterByPropertyValue('docType', docType) %}
{% if descendants.length %}
{% if title %}<h2>{$ title $}</h2>{% endif %}
<ul {% if not recursed %}class="descendants {$ docType $}"{% endif %}>
{% for descendant in descendants %}
<li>
<pre class="prettyprint lang-ts"><code>{$ descendant.name $}</code></pre>
{$ renderDescendants(descendant, docType, '', true) $}
</li>
{% endfor %}
</ul>
{% endif %}
{% endmacro %}