angular-cn/aio/tools/transforms/templates/api/directive.template.html

52 lines
1.9 KiB
HTML
Raw Normal View History

{% import "lib/memberHelpers.html" as memberHelpers -%}
{% extends 'class.template.html' -%}
{% macro renderAncestorMembers(doc, collectionName) %}
{%- for ancestor in doc.extendsClauses %}{% if ancestor.doc %}
{% set nonInternalMembers = ancestor.doc[collectionName] | filterByPropertyValue('internal', undefined) %}
{% if nonInternalMembers.length -%}
<section class="inherited-members-list">
<h3>Inherited from <code>{$ ancestor.doc.id $}</code></h3>
<ul>
{% for member in nonInternalMembers %}
<li>
<code><a class="code-anchor" href="{$ ancestor.doc.path $}#{$ member.anchor | urlencode $}">{$ memberHelpers.renderMemberSyntax(member, 1) $}</a></code>
</li>
{% endfor %}
</ul>
</section>
{% endif %}
{$ renderAncestorMembers(ancestor.doc, collectionName) $}
{% endif %}{% endfor -%}
{% endmacro %}
{% macro renderProperties(doc, heading) %}
{$ memberHelpers.renderProperties(doc.properties, 'instance-properties', 'instance-property', heading) $}
{$ renderAncestorMembers(doc, 'properties') $}
{% endmacro %}
{% block overview %}{% endblock %}
{% block details -%}
{% include "includes/ngmodule.html" %}
{% include "includes/selectors.html" %}
{$ renderProperties(doc, 'Properties') $}
{% include "includes/export-as.html" %}
{% if doc.description or doc.usageNotes %}
<section class="description">
<h2>Description</h2>
{$ (doc.description or '') | trimBlankLines | marked $}
{$ (doc.usageNotes or '') | trimBlankLines | marked $}
</section>
{% endif %}
{$ memberHelpers.renderProperties(doc.staticProperties, 'static-properties', 'static-property', 'Static properties') $}
{$ memberHelpers.renderMethodDetails(versionInfo, doc.staticMethods, 'static-methods', 'static-method', 'Static methods') $}
{$ memberHelpers.renderMethodDetails(versionInfo, doc.methods, 'instance-methods', 'instance-method', 'Methods') $}
{$ renderAncestorMembers(doc, 'methods') $}
{% endblock %}
{% block endNotes %}{% endblock %}