11.6.0 • Published 2 years ago
@vonage/vwc-angular-dialog v11.6.0
vwc-dialog
This library exposes a service VwcDialog
that enables you to open a vwc-dialog
with an angular component.
General Usage
- Install
@voange/vivid
or@vonage/vwc-dialog
and import thevwc-dialog
to your application. - Use the
VwcDialogService
in order to interact with the dialog (read on for detailed instructions)
Methods
open(componentClass: Type, dialogConfig: DialogConfig)
Arguments
componentClass
- a component class to render inside the dialog
dialogConfig
- a DialogConfig
for the dialog.
DialogConfig
data
- data to inject to the rendered component inside its data.
parent
- and html element to inject the vwc-dialog into
Returns
DialogInstance
Dialog Instance
Members
closed$
: Observable - an observable that changes its value when the dialog is closed with the default value or the data sent in the close method.
Methods
close<T>(data: T) => void
Closes the dialog and emits the data to the main service’s open observable.
Accepts
any
Usage Example
11.6.0
2 years ago