Bootstrap

API widget

BaseWidgetDirective

class
Extended by
Type Parameters

W extends Widget

Implements
Constructors
new BaseWidgetDirective

new BaseWidgetDirective<W>(): BaseWidgetDirective<W>

Returns

BaseWidgetDirective<W>

Properties
_widget

abstract protected readonly _widget: AngularWidget<W>

Accessors
api

get api(): W["api"]

Returns

W["api"]


state

get state(): Signal<WidgetState<W>>

Returns

Signal<WidgetState<W>>


widget

get widget(): ContextWidget<W>

Returns

ContextWidget<W>

Methods
ngOnChanges

ngOnChanges(changes): void

Parameters

changes: SimpleChanges

Returns

void

Inherit Doc
Implementation of

OnChanges.ngOnChanges


ngOnInit

ngOnInit(): void

Returns

void

Inherit Doc
Implementation of

OnInit.ngOnInit


callWidgetFactoryWithConfig

function

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

Call a widget factory using provided configs.

Type Parameters

W extends Widget<object, 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?: Pick<WidgetProps<W>, keyof WidgetProps<W> & `on${string}`>

the events of the widget

parameter.factory: WidgetFactory<W>

the widget factory to call

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

the config of the widget, overriding the defaultConfig

Returns

AngularWidget<W>

the widget