Overview
Description
Displays modal window.
ModalOptions
component: ConcreteType<any>
Popup component type.
IMPORTANT: Don`t forget to register type in NgModule.
providers?: Array<ng.Type | any[] | any>
Custom dependencies.
Default: Inherits component injector with ModalActions
.
modalParentSelector?: string
You can specify element in DOM that can be found by modalParentSelector.
By default, modal will be added to application root component.
backdrop?: ModalBackdrop
Dark overlay behind modal.
Bootstrap Docs
show?: boolean
Show modal when initialized.
Bootstrap Docs
keyboard?: boolean
Modal can be closed by Esc button.
Bootstrap Docs
ModalInstance
Created modal instance.
jqueryElement: any
JQuery element created by $(myElement).modal(…).
result: Observable<any>
Result data from modal.
discard (): void
Closes modal without success/error result.
close (val: any): void
Closes modal with success result.
error (val: any): void
Closes modal with error result.
ModalActions
Action available inside modal.
discard (): void
Closes modal without success/error result.
close (val: any): void
Closes modal with success result.
error (val: any): void
Closes modal with error result.
Example