2018-06-22 16:58:29 +01:00
{% extends 'base.template.html' -%}
2018-08-13 10:56:24 +01:00
{% macro listItems(items, title, overridePath) %}
2018-08-29 16:48:19 +01:00
{% set filteredItems = items | filterByPropertyValue('internal', undefined) %}
{% if filteredItems.length %}
2018-06-22 16:58:29 +01:00
< section class = "export-list" >
< h3 > {$ title $}< / h3 >
< table class = "is-full-width list-table" >
2018-08-29 16:48:19 +01:00
{% for item in filteredItems %}
2018-06-22 16:58:29 +01:00
< tr >
2018-09-26 14:05:38 +01:00
< td > < code class = "code-anchor" > < a href = "{$ overridePath or item.path $}" { % - if item . deprecated ! = undefined % } class = "deprecated-api-item" { % endif % } > {$ item.name $}< / a > < / code > < / td >
2018-09-17 17:37:18 +01:00
< td >
2018-10-21 17:43:29 +08:00
{% if item.deprecated !== undefined %}{$ ('**已废弃:** ' + item.deprecated) | marked $}{% endif %}
2018-09-17 17:37:18 +01:00
{% if item.shortDescription %}{$ item.shortDescription | marked $}{% endif %}
< / td >
2018-06-22 16:58:29 +01:00
< / tr >
{% endfor %}
< / table >
< / section >
{% endif %}
{% endmacro %}
2018-09-17 17:37:18 +01:00
{% block header %}
< header class = "api-header" >
< h1 > {$ doc.name $}< / h1 >
< label class = "api-type-label {$ doc.docType $}" > {$ doc.docType $}< / label >
2018-10-21 17:43:29 +08:00
{% if doc.packageDeprecated or (not doc.isPrimaryPackage and doc.deprecated !== undefined) %}< label class = "api-status-label deprecated" > 弃用< / label > {% endif %}
{% if doc.security !== undefined %}< label class = "api-status-label security" > 安全性< / label > {% endif %}
{% if doc.pipeOptions.pure === 'false' %}< label class = "api-status-label impure-pipe" > 非纯< / label > {% endif %}
2018-09-17 17:37:18 +01:00
< / header >
{% endblock %}
2018-06-22 16:58:29 +01:00
{% block body -%}
{$ doc.shortDescription | marked $}
{% if doc.description %}{$ doc.description | marked $}{% endif %}
{% include "includes/see-also.html" %}
2018-08-13 10:56:24 +01:00
{% if doc.isPrimaryPackage %}
2018-10-22 18:17:19 +08:00
< h2 id = "entry-points" > 入口点< / h2 >
2018-10-21 17:43:29 +08:00
{$ listItems([doc.packageInfo.primary], '主要', '#primary-entry-point-exports') $}
2018-08-08 15:15:56 +08:00
{$ listItems(doc.packageInfo.secondary, '次要') $}
2018-08-13 10:56:24 +01:00
{% endif %}
2018-06-22 16:58:29 +01:00
2018-10-22 18:17:19 +08:00
{% if doc.isPrimaryPackage %}
< h2 id = "primary-entry-point-exports" > 主入口点的导出< / h2 >
{% else %}
< h2 id = "entry-point-exports" > 入口点的导出< / h2 >
{% endif %}
2018-09-17 17:37:18 +01:00
{% include "includes/deprecation.html" %}
2018-10-21 17:43:29 +08:00
{$ listItems(doc.ngmodules, '模块') $}
2018-08-08 15:15:56 +08:00
{$ listItems(doc.classes, '类') $}
{$ listItems(doc.decorators, '装饰器') $}
{$ listItems(doc.functions, '函数') $}
{$ listItems(doc.structures, '结构') $}
{$ listItems(doc.directives, '指令') $}
{$ listItems(doc.pipes, '管道') $}
{$ listItems(doc.types, '类型') $}
2018-06-22 16:58:29 +01:00
{%- endblock %}