Bootstrap

API widget

BaseWidgetDirective

class

An abstract base class for widget directives, providing common functionality for Angular components that interact with widgets.

Extended by
Type Parameters

W extends Widget

The type of the widget.

Implements
Accessors
api

get api(): W["api"]

Retrieves the widget api

Returns

W["api"]

the widget api


directives

get directives(): W["directives"]

Retrieves the widget directives

Returns

W["directives"]

the widget directives


state

get state(): AngularState<W>

Retrieves the widget state as an Angular Signal

Returns

AngularState<W>

the widget state


callWidgetFactoryWithConfig

function

callWidgetFactoryWithConfig<W>(parameter): AngularWidget<W>

Call a widget factory using provided configs.

Type Parameters

W extends Widget<object, object, object, object>

Parameters

parameter

the parameter

parameter.afterInit?

a callback to call after successful setup of the widget

parameter.defaultConfig?: Partial<WidgetProps<W>> | ReadableSignal<undefined | Partial<WidgetProps<W>>>

the default config of the widget

parameter.events?: Partial<Pick<WidgetProps<W>, keyof WidgetProps<W> & `on${string}`>>

the events of the widget

parameter.factory: WidgetFactory<W>

the widget factory to call

parameter.slotChildren?

a function to provide the default children slot using a view query

parameter.slotTemplates?

a function to provide all slot templates using child queries

parameter.widgetConfig?: null | ReadableSignal<undefined | Partial<WidgetProps<W>>>

the config of the widget, overriding the defaultConfig

Returns

AngularWidget<W>

the widget