An abstract base class for widget directives, providing common functionality for Angular components that interact with widgets.
• W extends Widget
The type of the widget.
get
api():W
["api"
]
Retrieves the widget api
W
["api"
]
the widget api
get
directives():W
["directives"
]
Retrieves the widget directives
W
["directives"
]
the widget directives
get
state():AngularState
<W
>
Retrieves the widget state as an Angular Signal
AngularState
<W
>
the widget state
callWidgetFactoryWithConfig<
W
>(parameter
):AngularWidget
<W
>
Call a widget factory using provided configs.
• W extends Widget
<object
, object
, object
, object
>
• 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
the widget