angular-cn/aio/tools/transforms/templates
Pete Bacon Darwin b1902db0cb build(docs-infra): render all overloads if they are abstract (#25670)
In an overloaded method, the overload with the function body is the
actual method doc, and this doc is not included in the list of "additional"
overloads.

Moreover, the logic (all in dgeni-packages) is that if none of the items
has a body then we use the first overload as the actual method doc.

In the case of abstract methods, none of the methods have a body. So we
have a situation where the overloads collection does not contain the first
abstract method, even though it is not the "implementation" of the method.
Therefore we need to still render it.

Closes #25610

PR Close #25670
2018-08-27 18:19:08 -04:00
..
api build(docs-infra): render all overloads if they are abstract (#25670) 2018-08-27 18:19:08 -04:00
README.md docs(aio): tidy up tooling documentation (#18151) 2017-09-21 10:00:37 -07:00
content.template.html build(aio): render titles correctly in content pages 2017-04-19 10:42:38 +01:00
data-module.template.js build(aio): move the `transforms` folder into the `tools` folder 2017-04-16 22:05:23 +01:00
example-region.template.html build(aio): move the `transforms` folder into the `tools` folder 2017-04-16 22:05:23 +01:00
json-doc.template.json build(aio): move the `transforms` folder into the `tools` folder 2017-04-16 22:05:23 +01:00
overview-dump.template.html build(aio): render doc-gen issues in overview dump (#22675) 2018-03-14 10:20:30 -07:00
sitemap.template.xml build(aio): generate sitemap from the generated pages (#21689) 2018-01-22 12:55:15 -08:00

README.md

This folder contains the dgeni templates that are used to generate the API docs

Generally there is a template for each docType. Templates can extend and/or include other templates. Templates can also import macros from other template files.

Template inheritance

When extending a template, parent must declare blocks that can be overridden by the child. The template extension hierarchy looks like this (with declared blocks in parentheses):

  • layout/base.template.html (base)
    • module.template.html
    • layout/api-base.template.html (jumpNav, jumpNavLinks, whatItDoes, infoBar, securityConsiderations, deprecationNotes, howToUse, details)
      • class.template.html
        • directive.template.html
        • enum.template.html
      • var.template.html
        • const.template.html
        • let.template.html
      • decorator.template.html
      • function.template.html
      • interface.template.html
        • type-alias.template.html
      • pipe.template.html

Doc Properties

It is useful to know what properties are available on each doc type when working with the templates. The typescript Dgeni package is now written in TypeScript and there is a class for each of the types of API document. See https://github.com/angular/dgeni-packages/tree/master/typescript/src/api-doc-types. This is a good place to go to see what properties you can use in the templates.