Skip to content
@ng-doc/app / Class

NgDocDemoFrameComponent

Shows a demo page of the demo application in an iframe, as tall as the demo's content: the demo page reports its height with postMessage, and only messages from this iframe's window and origin are accepted. The iframe is created in the browser after the first render (the server renders a placeholder with a link to the demo page) and loads lazily. Until the demo reports its size, a placeholder tells that it is loading; a demo page that loads without reporting it within 10 seconds is reported as failed, with the link.

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

Members

Constructor

1
()
—

Properties

7
created: WritableSignal<boolean>
protectedreadonly

Whether the iframe exists: only in the browser, after the first render.

fill: InputSignal<boolean>
readonly input()

Whether the iframe fills its container instead of taking the demo's height (fullscreen).

protectedreadonly

The demo page's URL for the iframe.

frameTitle: InputSignal<string>
readonly input()required

The accessible title of the iframe.

height: WritableSignal<number | undefined>
readonly

The height the demo reported, in pixels.

src: InputSignal<string>
readonly input()required

The URL of the demo page, relative to the document or absolute on its origin.

state: Signal<"failed" | "loading" | "ready">
readonly

loading until the demo reports its size, then ready; failed when it never does.

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