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
OnChanges OnDestroy
@Component ({ … })
export class NgDocPlaygroundDemoComponent <T extends NgDocPlaygroundProperties = NgDocPlaygroundProperties >
implements OnChanges , OnDestroy { … }Members
Properties22 | |||||||
canvasBackground: | 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: | The dots of the canvas while the iframe shows a theme of its own, in that theme's color. | ||||||
code: | — | ||||||
configuration: | The playground configuration, extended by the action's options. | ||||||
configuredTheme: | The | ||||||
demoOutlet: | Where the playground class is created. | ||||||
destroyRef: | — | ||||||
expanded: | Whether the code of the demo is shown. | ||||||
form: | The values of the inputs and content slots. | ||||||
frame: | The iframe of an isolated playground; without it, the class is created in the page. | ||||||
frameDefaults: | The defaults of the target's inputs that the iframe reported, for the code view. | ||||||
frameMessage: | The messages of the iframe of an isolated playground. | ||||||
frameSilent: | The iframe's page loaded but did not report the target in time. | ||||||
frameTheme: | The theme of the iframe, which the theme button beside the demo changes. | ||||||
frameUrl: | The iframe's page with the current state, which the toolbar opens in a new tab. | ||||||
id: | The name of the playground in the page configuration. | ||||||
injector: | — | ||||||
pipeName: | The name of the pipe, when the target is a pipe. | ||||||
playgroundDemo?: typeof | The generated playground class of this demo's selector or pipe. | ||||||
properties: | The inputs of the target. | ||||||
recreateDemo: | Whether the demo is created again each time a value changes. | ||||||
selector: | The selector of the target this demo renders. | ||||||
Methods2 | |||||||
(…): Promise<void> | — | ||||||
Signature Parameters
Returns Promise<void> | |||||||
(): void | — | ||||||
Signature Returns void | |||||||