Skip to content
@ng-doc/app / Class abstract

NgDocBasePlayground

Base class of the playground classes the builder generates, one per playground and selector. A generated class renders the playground template with the target's inputs bound to properties(), and queries the target with viewChild().

Decorators
@Directive
Implements
Pick<NgDocPlaygroundConfig, "data">OnInit
DeclarationTypeScript
@Directive()
export abstract class NgDocBasePlayground
  implements Pick<NgDocPlaygroundConfig, 'data'>, OnInit { … }

Members

Constructor

1
()
—

Static Properties

1
selector: string
staticreadonly
—

Properties

9
actionData: InputSignal<Record<string, unknown>>
readonly input()

The data given to the playground action; it extends the configuration's data.

changeDetectorRef: ChangeDetectorRef
protectedreadonly
—
configData: Record<string, unknown>
abstractreadonly

The data of the playground configuration.

content: InputSignal<Record<string, any>>
readonly input()

Whether each content slot is shown, by slot name.

defaultValues: Record<string, unknown>

The default values of the target's inputs, read before the template binds them.

playground: Signal<unknown>
abstractreadonly

The instance of the target in the playground template; a pipe has none.

properties: InputSignal<Record<string, any>>
readonly input()

Values of the target's inputs, by property name.

target: Constructor<unknown>
abstractreadonly

The class the playground shows: a component, a directive or a pipe.

viewContainerRef: Signal<ViewContainerRef | undefined>
abstractreadonly

The view container of the target in the playground template; a pipe has none.

Accessors

2
get data: any

The playground data: the configuration's data extended by the action's data.

get onReattached: Observable<void>

Emits once, after the view is attached again and checks the template's bindings.

Methods

1
(): void
implements OnInit
—
Symbol
Kind
Class abstract
Decorators
@Directive
Implements
Pick<NgDocPlaygroundConfig, "data">OnInit
Scope
@ng-doc/app
Edit this page