Skip to content
@ng-doc/app / Class

NgDocPlaygroundDemoComponent

One demo of a playground: it creates the generated playground class of its selector (or pipe), passes it the form's values and shows the code of the current state. In an isolated playground the class runs on a page of the demo application in an iframe, which gets the values from its URL fragment, and reports the target's defaults back for the code view.

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

Members

Properties

22
canvasBackground: Signal<string | undefined>
protectedreadonly

The background of the canvas while the iframe shows a theme of its own: the background its page reported, so the whole canvas reads in that theme.

canvasDots: Signal<string | undefined>
protectedreadonly

The dots of the canvas while the iframe shows a theme of its own, in that theme's color.

code: WritableSignal<string>
protectedreadonly
—
configuration: InputSignal<NgDocPlaygroundConfig | undefined>
readonly input()

The playground configuration, extended by the action's options.

configuredTheme: InputSignal<string | undefined>
readonly input()

The theme option of the playground, which the theme button offers too.

demoOutlet: Signal<ViewContainerRef | undefined>
readonly

Where the playground class is created.

destroyRef: DestroyRef
protectedreadonly
—
expanded: InputSignal<boolean>
readonly input()

Whether the code of the demo is shown.

readonly input()

The values of the inputs and content slots.

frame: InputSignal<ɵNgDocPlaygroundFrame | undefined>
readonly input()

The iframe of an isolated playground; without it, the class is created in the page.

frameDefaults: InputSignal<Record<string, unknown> | undefined>
readonly input()

The defaults of the target's inputs that the iframe reported, for the code view.

frameMessage: OutputEmitterRef<ɵNgDocPlaygroundFrameMessage>
readonly output()

The messages of the iframe of an isolated playground.

frameSilent: OutputEmitterRef<void>
readonly output()

The iframe's page loaded but did not report the target in time.

frameTheme: ModelSignal<string | undefined>
readonly model()

The theme of the iframe, which the theme button beside the demo changes.

frameUrl: Signal<string | undefined>
protectedreadonly

The iframe's page with the current state, which the toolbar opens in a new tab.

id: InputSignal<string>
readonly input()

The name of the playground in the page configuration.

injector: Injector
protectedreadonly
—
pipeName: InputSignal<string>
readonly input()

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

playgroundDemo?: typeof NgDocBasePlayground | undefined

The generated playground class of this demo's selector or pipe.

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

The inputs of the target.

recreateDemo: InputSignal<boolean>
readonly input()

Whether the demo is created again each time a value changes.

selector: InputSignal<string>
readonly input()

The selector of the target this demo renders.

Methods

2
(…): Promise<void>
async implements OnChanges
—
(): void
implements OnDestroy
—
Symbol
Kind
Class
Decorators
@Component
Selectors
ng-doc-playground-demo
Generic types
T
Implements
OnChangesOnDestroy
Scope
@ng-doc/app
Edit this page