8945d7c7c1
The "Usage Notes" section is often at the bottom of a long page of content which can make it difficult to discover. This commit adds a link at the end of the "Description" if there is a "Usage Notes" section on the page. This link should help the reader to discover that there is more information available further down the page. This is basically a marginal fix. The longer term fix should be to consider what content goes in which sections and how they should be laid out on the page. See #40753 PR Close #40835 |
||
---|---|---|
.. | ||
api | ||
cli | ||
error | ||
lib | ||
README.md | ||
content.template.html | ||
data-module.template.js | ||
example-region.template.html | ||
json-doc.template.json | ||
overview-dump.template.html | ||
sitemap.template.xml |
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 (bread-crumbs, header, embedded contents and body)
- package.template.html
- export-base.template.html (short-description, security-notes, deprecation, overview, see-also, details, usageNotes)
- 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
- value-module.template.html
- type-alias.template.html
- pipe.template.html
- ngmodule.template.html
- class.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.