import { DaffModalComponent } from '@daffodil/design/modal'
@Component()
class DaffModalComponent implements AfterContentInit, AfterViewInit, DaffOpenable {
@HostBinding() modalClass: boolean = true
@HostBinding() role: string = 'dialog'
@HostBinding() ariaModal: boolean = true
@HostBinding() ariaLabelledBy: string
animationCompleted: EventEmitter<any> = new EventEmitter<any>()
closedAnimationCompleted: EventEmitter<any> = new EventEmitter<
any
>()
@HostBinding()
get fadeState(): string
get open(): boolean
ngAfterContentInit(): void
ngAfterViewInit(): void
attachContent(portal: ComponentPortal<any>): any
@HostListener() animationDone(e: AnimationEvent_2): void
reveal(): void
hide(): void
toggle(): void
}
boolean
Default | true |
---|---|
Description | Sets a class of .daff-modal to the host element. |
string
Default | 'dialog' |
---|---|
Description | Sets the role to dialog. |
boolean
Default | true |
---|---|
Description | Sets aria-modal to true. |
string
Default | – |
---|---|
Description | The aria-labelledby for the modal. This is set by the id of
|
EventEmitter<any>
Default | new EventEmitter<any>() |
---|---|
Description | Event fired when the close animation is completed. |
EventEmitter<any>
Default | new EventEmitter<
any
>() |
---|---|
Description | Event fired when the close animation is completed. |
string
Default | – |
---|---|
Description | Animation hook that controls the entrance and exit animations of the modal. |
boolean
Default | – |
---|---|
Description |
void
void
any
Helper method to attach portable content to modal.
Parameter | portal: ComponentPortal |
---|---|
Description |
void
Animation event that can used to hook into when animations are fully completed. We use this in the DaffModalService to determine when to actually remove the dynamically rendered element from the DOM so that the animation does not clip as the element is removed.
Parameter | e: AnimationEvent_2 |
---|---|
Description |
void
Reveals the modal
void
Hides the modal
void
Toggles the visibility of the modal