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
@Component ({ … })
export class NgDocPlaygroundComponent <T extends NgDocPlaygroundProperties = NgDocPlaygroundProperties >
implements AfterViewInit { … }Members
Constructor1 | |
() | — |
Signature | |
Properties15 | |
configuration: | The playground configuration of the page, extended by the options. |
defaultValues: | The default values of the target's inputs, reported by the first demo. |
fallback: | 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: | The note that says why an isolated playground renders in the page. |
formGroup: | The values of the inputs and content slots. |
frames: | The iframe of each target, by selector or pipe name, while the playground is isolated. |
frameTheme: | The theme of the iframes: the |
id: | The name of the playground in the page configuration. |
isolated: | Whether the demos are shown in iframes of their pages in the demo application. |
options: | Options of the playground action; they extend the playground configuration. |
pipeName: | The name of the pipe, when the target is a pipe. |
properties: | The inputs of the target. |
recreateDemo: | Whether the demo is created again each time a value changes. It starts from the |
recreateLocked: | Whether the Recreate setting is fixed on, and hidden, by the |
selectors: | The selectors of the target to render a demo for. |
Methods3 | |
(): boolean | — |
Signature Returns boolean | |
(): void | — |
Signature Returns void | |
(): void | Sets every input and content slot back to its default value. |
Signature Returns void | |