Skip to content
@ng-doc/app / Class

NgDocPlaygroundComponent

A playground: an inspector with a control per input and content slot of its target, and a demo per selector (or the pipe) rendered with the chosen values.

An isolated playground (the isolated option, or isolatedPlaygrounds) shows each demo in an iframe of its page in the demo application, which the Vite engine builds. The inspector stays here and passes the values in the iframe's URL fragment; the page reports the target's defaults back. When a value can't be put in the URL, the playground renders its demos in the page instead, with a note that names the input.

Decorators
@Component
Selectors
ng-doc-playground
Generic types
T
Implements
AfterViewInit
DeclarationTypeScript

Members

Constructor

1
()
—

Properties

15
readonly

The playground configuration of the page, extended by the options.

defaultValues: WritableSignal<Record<string, unknown> | undefined>
readonly

The default values of the target's inputs, reported by the first demo.

fallback: WritableSignal<string | undefined>
readonly

The note that says why the playground renders in the page although it is isolated: the input whose value can't be sent to its iframes, or what failed. Once set, it stays for the rest of the visit.

fallbackNote: Signal<string | undefined>
readonly

The note that says why an isolated playground renders in the page.

readonly

The values of the inputs and content slots.

frames: Signal<Map<string, ɵNgDocPlaygroundFrame> | undefined>
readonly

The iframe of each target, by selector or pipe name, while the playground is isolated.

frameTheme: WritableSignal<string | undefined>
readonly

The theme of the iframes: the theme option, until the reader picks another with the theme button beside a demo; undefined follows the page.

id: InputSignal<string>
readonly input()required

The name of the playground in the page configuration.

isolated: Signal<boolean>
readonly

Whether the demos are shown in iframes of their pages in the demo application.

readonly input()

Options of the playground action; they extend the playground configuration.

pipeName: InputSignal<string>
readonly input()

The name of the pipe, when the target is a pipe.

properties: InputSignal<T | undefined>
readonly input()

The inputs of the target.

recreateDemo: WritableSignal<boolean>
readonly

Whether the demo is created again each time a value changes. It starts from the recreate option; the reader can change it unless the option is 'always'.

recreateLocked: Signal<boolean>
readonly

Whether the Recreate setting is fixed on, and hidden, by the 'always' option.

selectors: InputSignal<string[]>
readonly input()

The selectors of the target to render a demo for.

Methods

3
(): boolean
protected
—
(): void
implements AfterViewInit
—
(): void

Sets every input and content slot back to its default value.

Symbol
Kind
Class
Decorators
@Component
Selectors
ng-doc-playground
Generic types
T
Implements
AfterViewInit
Scope
@ng-doc/app
Edit this page