build(docs-infra): separate NgModules from Classes in API docs (#25734)
PR Close #25734
This commit is contained in:

committed by
Kara Erickson

parent
34b848ad51
commit
bc5cb8153e
54
aio/tools/transforms/templates/api/ngmodule.template.html
Normal file
54
aio/tools/transforms/templates/api/ngmodule.template.html
Normal file
@ -0,0 +1,54 @@
|
||||
{% import "lib/memberHelpers.html" as memberHelpers -%}
|
||||
{% import "lib/descendants.html" as descendants -%}
|
||||
{% import "lib/paramList.html" as params -%}
|
||||
{% extends 'export-base.template.html' -%}
|
||||
|
||||
{% macro renderTable(items, containerClass, headingText, tableHeading) %}
|
||||
<section class="{$ containerClass $}">
|
||||
<h2>{$ headingText $}</h2>
|
||||
<table class="is-full-width list-table property-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$ tableHeading $}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in items %}
|
||||
<tr>
|
||||
<td>
|
||||
<code-example language="ts" hideCopy="true" linenums="false" class="no-box">
|
||||
{$ item | escape $}
|
||||
</code-example>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
{% endmacro %}
|
||||
|
||||
{% block overview %}
|
||||
{% include "includes/class-overview.html" %}
|
||||
{% endblock %}
|
||||
{% block details %}
|
||||
{% block additional %}{% endblock %}
|
||||
{% include "includes/description.html" %}
|
||||
{$ memberHelpers.renderProperties(doc.staticProperties, 'static-properties', 'static-property', 'Static properties') $}
|
||||
{$ memberHelpers.renderMethodDetails(versionInfo, doc.staticMethods, 'static-methods', 'static-method', 'Static methods') $}
|
||||
{% if doc.constructorDoc %}
|
||||
<h2>Constructor</h2>
|
||||
{$ memberHelpers.renderMethodDetail(versionInfo, doc.constructorDoc, 'constructor') $}{% endif %}
|
||||
|
||||
{$ memberHelpers.renderProperties(doc.properties, 'instance-properties', 'instance-property', 'Properties') $}
|
||||
|
||||
{$ memberHelpers.renderMethodDetails(versionInfo, doc.methods, 'instance-methods', 'instance-method', 'Methods') $}
|
||||
|
||||
{% if doc.ngmoduleOptions.providers %}
|
||||
{$ renderTable(doc.ngmoduleOptions.providers, 'providers', 'Providers', 'Provider') $}
|
||||
{% endif %}
|
||||
|
||||
{% if doc.ngmoduleOptions.exports %}
|
||||
{$ renderTable(doc.ngmoduleOptions.exports, 'exports', 'Exports', 'Export') $}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
Reference in New Issue
Block a user