import { KbqModalModule } from '@koobiq/components/modal';
Properties
Name Description
afterAllClose: Observable
openModals: KbqModalRef[]
Methods
closeAll
confirm
create
delete
open
success

Selector: [kbq-modal-title], kbq-modal-title, [kbqModalTitle]

Selector: [kbq-modal-body], kbq-modal-body, [kbqModalBody]

Selector: [kbq-modal-footer], kbq-modal-footer, [kbqModalFooter]

Selector: kbq-modal

Properties
Name Description
@Input()
kbqBodyStyle: object
@Input()
kbqCancelLoading: boolean
@Input()
kbqCancelText: string
@Input()
kbqClassName: string
@Input()
kbqClosable: boolean
@Input()
kbqCloseByESC: boolean
@Input()
kbqComponent: Type$1
@Input()
kbqComponentParams: any
@Input()
kbqContent: string | TemplateRef<{}> | Type$1
@Input()
kbqFooter: string | TemplateRef<{}> | IModalButtonOptions[]
@Input()
kbqGetContainer: HTMLElement | OverlayRef | (() => HTMLElement | OverlayRef)
@Input()
kbqMask: boolean
@Input()
kbqMaskClosable: boolean
@Input()
kbqMaskStyle: object
@Input()
kbqModalType: ModalType
@Input()
kbqOkLoading: boolean
@Input()
kbqOkText: string
@Input()
kbqOkType: KbqComponentColors
@Input()
@Output('kbqOnCancel')
kbqOnCancel: EventEmitter | OnClickCallback
@Input()
@Output('kbqOnOk')
kbqOnOk: EventEmitter | OnClickCallback
@Input()
kbqRestoreFocus: boolean
@Input()
kbqSize: ModalSize
@Input()
kbqStyle: object
@Input()
kbqTitle: string | TemplateRef<{}>
@Input()
kbqVisible: boolean
@Input()
kbqWidth: string | number
@Input()
kbqWrapClassName: string
@Output('kbqAfterClose')
kbqAfterClose: EventEmitter
@Output('kbqAfterOpen')
kbqAfterOpen: EventEmitter
@Output('kbqBeforeClose')
kbqBeforeClose: EventEmitter
Emitted before the modal begins its closing animation.
@Output('kbqVisibleChange')
kbqVisibleChange: EventEmitter
afterClose: Observable
afterOpen: Observable
autoFocusedButtons: QueryList>
beforeClose: Observable Observable alias for `kbqBeforeClose`
bodyContainer: ViewContainerRef
cancelText: string
componentColors: typeof KbqComponentColors
document: Document
hidden: boolean
isBottomOverflow: boolean
isTopOverflow: boolean
maskAnimationClassMap: object
modalAnimationClassMap: object
modalBody: ElementRef
modalContainer: ElementRef
okText: string
transformOrigin: string
Methods
checkOverflow
close
destroy
getButtonCallableProp
getContentComponent
getContentComponentRef
getElement
getInstance
getKbqFooter
handleCloseResult
isComponent
isModalButtons
isModalType
isNonEmptyString
isTemplateRef
markForCheck
onButtonClick
onClickCloseBtn
onClickMask
onClickOkCancel
onKeyDown
open
triggerCancel
triggerOk

Selector: [kbq-modal-main-action]

API class that public to users to handle the modal instance. KbqModalRef is aim to avoid accessing to the modal instance directly by users.

Properties
Name Description
afterClose: Observable
afterOpen: Observable
beforeClose: Observable
Methods
close
destroy
getContentComponent
Return the component instance of kbqContent when specify kbqContent as a Component Note: this method may return undefined if the Component has not ready yet. (it only available after Modal's ngOnInit)
getElement
Get the dom element of this Modal
getInstance
Get the instance of the Modal itself
markForCheck
Call markForCheck for change detector
open
triggerCancel
triggerOk
Trigger the kbqOnOk/kbqOnCancel by manual
Properties
Name Description
data: any Data being injected into the child component.
kbqAfterClose: EventEmitter
kbqAfterOpen: EventEmitter
kbqBodyStyle: object
kbqCancelLoading: boolean
kbqCancelText: string
kbqClassName: string
kbqClosable: boolean
kbqCloseByESC: boolean
kbqComponent: Type$1
kbqContent: string | TemplateRef<{}> | Type$1
kbqFooter: string | TemplateRef<{}> | IModalButtonOptions[]
kbqGetContainer: HTMLElement | OverlayRef | (() => HTMLElement | OverlayRef)
kbqMask: boolean
kbqMaskClosable: boolean
kbqMaskStyle: object
kbqModalType: ModalType
kbqOkLoading: boolean
kbqOkText: string
kbqOkType: string
kbqOnCancel: EventEmitter | OnClickCallback
kbqOnOk: EventEmitter | OnClickCallback
kbqRestoreFocus: boolean
kbqSize: ModalSize
kbqStyle: object
kbqTitle: string | TemplateRef<{}>
kbqVisible: boolean
kbqWidth: string | number
kbqWrapClassName: string
Deprecated
kbqComponentParams: any
Properties
Name Description
data: any Data being injected into the child component.
injector: Injector The injector used to create the component that will be attached. If specified, it overrides the injector provided by `KbqModalService`.
kbqAfterClose: EventEmitter
kbqAfterOpen: EventEmitter
kbqBodyStyle: object
kbqCancelLoading: boolean
kbqCancelText: string
kbqClassName: string
kbqClosable: boolean
kbqCloseByESC: boolean
kbqComponent: Type$1
kbqContent: string | TemplateRef<{}> | Type$1
kbqFooter: string | TemplateRef<{}> | IModalButtonOptions[]
kbqGetContainer: HTMLElement | OverlayRef | (() => HTMLElement | OverlayRef)
kbqMask: boolean
kbqMaskClosable: boolean
kbqMaskStyle: object
kbqModalType: ModalType
kbqOkLoading: boolean
kbqOkText: string
kbqOkType: string
kbqOnCancel: OnClickCallback
kbqOnOk: OnClickCallback
kbqRestoreFocus: boolean
kbqSize: ModalSize
kbqStyle: object
kbqTitle: string | TemplateRef<{}>
kbqVisible: boolean
kbqWidth: string | number
kbqWrapClassName: string
Deprecated
kbqComponentParams: any
Properties
Name Description
autoFocus: boolean
autoLoading: boolean
disabled: boolean | ((this: IModalButtonOptions, contentComponentInstance?: T) => boolean)
ghost: boolean
kbqModalMainAction: boolean
label: string
loading: boolean | ((this: IModalButtonOptions, contentComponentInstance?: T) => boolean)
shape: string
show: boolean | ((this: IModalButtonOptions, contentComponentInstance?: T) => boolean)
size: string
type: string
Methods
onClick
type OnClickCallback = (instance: T) => (false | void | {}) | Promise<false | void | {}>;
type ModalType = 'default' | 'confirm' | 'custom';
type ConfirmType = 'confirm' | 'success' | 'warn';

Injection token that can be used to access the data that was passed in to a modal.

const KBQ_MODAL_DATA: InjectionToken<unknown>;
Вопросы и предложения по документации
Если у вас есть вопросы или вы хотите внести свой вклад в написание документации, пожалуйста, создайте issue в нашем репозитории на GitHub.