src/app/shared/components/drawer/drawer/drawer.component.ts
Side drawer component. Contains all the logic for opening/closing/expanding.
AfterViewInit
OnDestroy
changeDetection | ChangeDetectionStrategy.OnPush |
exportAs | ccfDrawer |
selector | ccf-drawer |
styleUrls | ./drawer.component.scss |
templateUrl | ./drawer.component.html |
Properties |
|
Methods |
Inputs |
Outputs |
HostBindings |
HostListeners |
Accessors |
constructor(messageService: MessageService, cdr: ChangeDetectorRef, element: ElementRef
|
||||||||||||||||
Creates an instance of drawer component.
Parameters :
|
expanded | |
Type : boolean
|
|
Whether the drawer is expanded. |
opened | |
Type : boolean
|
|
Whether the drawer is opened. |
position | |
Type : "start" | "end"
|
|
Position of the drawer - start (left) or end (right). |
expandedChange | |
Type : EventEmitter
|
|
Output emitting when the drawer has expanded. |
openedChange | |
Type : EventEmitter
|
|
Output emitting when the drawer has opened. |
stateChange | |
Type : EventEmitter
|
|
Output emitting whenever the drawer state changes. |
@expandCollapse |
Expanded/collapsed state parameters. |
@openClose |
Type : OpenedState
|
Default value : 'closed'
|
Current open/close animation state. |
class |
Type : "ccf-drawer"
|
Default value : 'ccf-drawer'
|
HTML class |
class.ccf-drawer-end |
Type : boolean
|
Whether this is located at the end position. |
@expandCollapse.done |
@expandCollapse.done()
|
Listener to expand/collapse animation completion. |
@openClose.done |
@openClose.done()
|
Listener to open/close animation completion. |
close |
close()
|
Closes the drawer.
Returns :
void
|
closeExpanded |
closeExpanded()
|
Collapses the drawer.
Returns :
void
|
closeOpenDone |
closeOpenDone()
|
Decorators :
@HostListener('@openClose.done')
|
Listener to open/close animation completion.
Returns :
void
|
expandCollapseDone |
expandCollapseDone()
|
Decorators :
@HostListener('@expandCollapse.done')
|
Listener to expand/collapse animation completion.
Returns :
void
|
open |
open()
|
Opens the drawer.
Returns :
void
|
openExpanded |
openExpanded()
|
Expands the drawer.
Returns :
void
|
toggle | ||||||||
toggle(opened)
|
||||||||
Toggles the drawer between opened and closed.
Parameters :
Returns :
void
|
toggleExpanded | ||||||||
toggleExpanded(expanded)
|
||||||||
Toggles the drawer between expanded and collapsed.
Parameters :
Returns :
void
|
Readonly className |
Type : string
|
Default value : 'ccf-drawer'
|
Decorators :
@HostBinding('class')
|
HTML class |
expandedState |
Type : ExpandedState
|
Default value : 'closed'
|
Current expanded/collapsed animation state. |
Static ngAcceptInputType_expanded |
Type : BooleanInput
|
Static ngAcceptInputType_opened |
Type : BooleanInput
|
Static ngAcceptInputType_position |
Type : string | "start" | "end"
|
Workaround for getter/setter pair not accepting different types. |
openedState |
Type : OpenedState
|
Default value : 'closed'
|
Decorators :
@HostBinding('@openClose')
|
Current open/close animation state. |
classEnd |
getclassEnd()
|
Whether this is located at the end position.
Returns :
boolean
|
position | ||||||
getposition()
|
||||||
Position of the drawer - start (left) or end (right).
Returns :
"start" | "end"
|
||||||
setposition(value: "start" | "end")
|
||||||
Parameters :
Returns :
void
|
opened | ||||||
getopened()
|
||||||
Whether the drawer is opened.
Returns :
boolean
|
||||||
setopened(value: boolean)
|
||||||
Parameters :
Returns :
void
|
expanded | ||||||
getexpanded()
|
||||||
Whether the drawer is expanded.
Returns :
boolean
|
||||||
setexpanded(value: boolean)
|
||||||
Parameters :
Returns :
void
|
expandedStateObj |
getexpandedStateObj()
|
Expanded/collapsed state parameters. |
./drawer.component.scss