Skip to content
@ng-doc/app / Class

NgDocDemoHostComponent

Shows the demo of a demo page: the component in the route's ngDocDemo data, with the inputs of the inputs query parameter (the JSON of the inputs option of the demo action).

The demo application hydrates its server-rendered page, but not the demo: a demo is the user's component and need not be hydration-safe, and the server renders it without the inputs of the query, which only the browser has. So the host skips hydration, as documentation pages do for their content, and the browser renders the demo again.

Decorators
@Component
Selectors
ng-doc-demo-host
DeclarationTypeScript
@Component({ … })
export class NgDocDemoHostComponent { … }

Members

Properties

2
demo: Type<unknown> | undefined
protectedreadonly

The demo component, or undefined on the page of a demo that does not exist.

inputs: Record<string, unknown>
protectedreadonly

The inputs of the demo.

Symbol
Kind
Class
Decorators
@Component
Selectors
ng-doc-demo-host
Scope
@ng-doc/app
Edit this page