Pete Bacon Darwin 85f5cb45d2 build(docs-infra): associate providedIn injectables with their NgModule (#41960)
Such injectables were not appearing in the providers lists of their NgModule.
This commit updates the doc-gen to support associating these automatically.
Further, it also allows developers to mark other injectables that are provided
in an NgModule with a reference to the NgModule where they are provided.

The commit also does a refactoring of the `processNgModuleDocs` dgeni
processor code, to make it easier to maintain.

Fixes #41203

PR Close #41960
2021-05-10 10:28:30 -04:00

25 lines
1.1 KiB
HTML

{% import "lib/memberHelpers.html" as memberHelpers -%}
{% import "lib/ngmodule.html" as ngModuleHelpers -%}
{% import "lib/paramList.html" as params -%}
<section class="{$ doc.docType $}-overview">
<code-example hideCopy="true" class="no-box api-heading{% if doc.deprecated %} deprecated-api-item{% endif %}">{{ {$ doc.valueParam.name $}_expression | <span class="kwd nocode">{$ doc.pipeName $}</span>
{%- for param in doc.pipeParams %}
{%- if param.isOptional or param.defaultValue !== undefined %} [{% endif %} : {$ param.name $}
{%- endfor %}
{%- for param in doc.pipeParams %}
{%- if param.isOptional or param.defaultValue !== undefined %} ]{% endif %}
{%- endfor %} }}</code-example>
{$ ngModuleHelpers.ngModuleList(doc.ngModules, 'Exported from') $}
{% if doc.valueParam.type %}
<h2>Input value</h2>
{$ params.renderParameters([doc.valueParam], 'pipe-parameters', 'pipe-parameter', true) $}
{% endif %}
{% if doc.pipeParams.length %}
<h2>Parameters</h2>
{$ params.renderParameters(doc.pipeParams, 'pipe-parameters', 'pipe-parameter', true) $}
{% endif %}
</section>