Guide 05
Comments
cngxjs (opens in new tab) Updated Guide 05 of 13
Use plain JSDoc-style block comments (opens in new tab). Markdown is rendered in descriptions: lists, fenced code, tables, links, headings. Multi-paragraph descriptions are preserved.
/**
* Renders a card with optional selection state.
*
* Use `as="link"` for a navigation-only card.
*
* | Mode | Use case |
* |---------|---------------------------|
* | article | static content card |
* | button | clickable action card |
* | link | navigation card |
*/
@Component({ ... })
export class CardComponent { ... } The block above the class header becomes the entity description on the rendered page. Member-level comments (properties, methods, accessors, host listeners) render inline on each member card.
Fenced code in descriptions
Fenced code blocks in descriptions are syntax-highlighted with Shiki, picking the same theme
pair your project is using. The default highlight language for description-level
@example blocks is HTML. Assert against identifier text rather than
the language class when writing custom downstream tooling.
Inline cross-references
Reference another symbol with {@link}. Resolution is
project-wide and runs across additional pages too.
/**
* See {@link Button} for the button-only variant.
*
* @see {@link Card.Header}
*/ Additional pages
Markdown files outside the source tree can be wired in via a
summary.json manifest. Slugs are derived from each page’s
title; missing files surface a per-page warning rather than
failing the build. Nesting deeper than five levels is a hard error.
{@link} works inside additional-page markdown identically to source
comments.