NgDocTocComponent
The "On this page" rail: the headings of the page, the section the reader is in, the reading progress, and the Back to top, Copy link and Edit this page actions.
The active section follows scrolling: it is the last heading above a line a little below the navbar, or the last heading once the page is scrolled to the end. A heading the reader picked (an entry clicked, or a link to its fragment) stays active until the reader scrolls again, so a section near the end of the page, which cannot scroll to the top, is still marked. A soft marker glides to the active entry. Tracking pauses while the rail is hidden.
While the rail exists, the L shortcut runs its Copy link action, so the rail confirms the copy.
- Decorators
@Component - Selectors
ng-doc-toc - Implements
NgDocPageToc
@Component ({ … })
export class NgDocTocComponent implements NgDocPageToc { … }Members
Constructor1 | |||||||
() | — | ||||||
Signature | |||||||
Properties8 | |||||||
activeIndex: | Index of the heading of the section the reader is in. | ||||||
activeItem: | The heading of the section the reader is in. | ||||||
copied: | Whether the link was just copied. | ||||||
details: | The symbol details of an API page, shown above the headings. | ||||||
document: Document | — | ||||||
editSourceFileUrl: | URL where the reader can edit the page source. Without it, the rail has no Edit action. | ||||||
progress: | How much of the page has been scrolled, in percent. | ||||||
tableOfContent: | The headings of the page. | ||||||
Methods3 | |||||||
(): void | Copies the link to the page, without its query and fragment. | ||||||
Signature Returns void | |||||||
(…): void | Marks a heading as the active section until the reader scrolls again. | ||||||
Signature Parameters
Returns void | |||||||
(): void | Scrolls the page back to its top. | ||||||
Signature Returns void | |||||||