mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
40 lines
1.3 KiB
HTML
40 lines
1.3 KiB
HTML
{% macro renderBindings(bindings, cssContainerClass, cssItemClass, title) -%}
|
|
{% set hasDescription = bindings | hasValues('memberDoc.description') %}
|
|
{% set hasTypes = bindings | hasValues('memberDoc.type') %}
|
|
{% if bindings.length %}
|
|
<section class="{$ cssContainerClass $}">
|
|
<h2>{$ title $}</h2>
|
|
<table class="is-full-width list-table binding-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Binding</th>
|
|
{% if hasTypes %}<th>Type</th>{% endif %}
|
|
{% if hasDescription %}<th>Description</th>{% endif %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for binding in bindings %}
|
|
<tr class="{$ cssItemClass $}">
|
|
<td><a href="#{$ binding.memberDoc.anchor $}">
|
|
<code>{$ binding.bindingName $}
|
|
{%- if binding.bindingName != binding.propertyName %} ({$ binding.propertyName $}){% endif-%}
|
|
</code>
|
|
</a></td>
|
|
{% if hasTypes %}
|
|
<td><label class="property-type-label"><code>{$ binding.memberDoc.type | escape $}</code></label></td>
|
|
{% endif %}
|
|
{% if hasDescription %}
|
|
<td>
|
|
{$ binding.memberDoc.shortDescription | marked $}
|
|
{$ binding.memberDoc.description | marked $}
|
|
</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
{% endif %}
|
|
{%- endmacro %}
|
|
|
|
|