import {MatBottomSheetModule} from '@angular/material/bottom-sheet';
MatBottomSheet
Service to trigger Material Design bottom sheets.
dismiss | |
---|---|
Dismisses the currently-visible bottom sheet. |
open | |
---|---|
Parameters | |
component ComponentType<T> | |
config? MatBottomSheetConfig<D> | |
Returns | |
MatBottomSheetRef<T, R> |
open | |
---|---|
Parameters | |
template TemplateRef<T> | |
config? MatBottomSheetConfig<D> | |
Returns | |
MatBottomSheetRef<T, R> |
MatBottomSheetConfig
Configuration used when opening a bottom sheet.
Name | Description |
---|---|
| Aria label to assign to the bottom sheet element. |
| Custom class for the backdrop. |
| Whether the bottom sheet should close when the user goes backwards/forwards in history. |
| Data being injected into the child component. |
| Text layout direction for the bottom sheet. |
| Whether the user can use escape or clicking outside to close the bottom sheet. |
| Whether the bottom sheet has a backdrop. |
| Extra CSS classes to be added to the bottom sheet container. |
| The view container to place the overlay for the bottom sheet into. |
MatBottomSheetRef
Reference to a bottom sheet dispatched from the bottom sheet service.
Name | Description |
---|---|
| Instance of the component making up the content of the bottom sheet. |
afterDismissed | |
---|---|
Gets an observable that is notified when the bottom sheet is finished closing. | |
Returns | |
Observable<R | undefined> |
afterOpened | |
---|---|
Gets an observable that is notified when the bottom sheet has opened and appeared. | |
Returns | |
Observable<void> |
backdropClick | |
---|---|
Gets an observable that emits when the overlay's backdrop has been clicked. | |
Returns | |
Observable<MouseEvent> |
dismiss | |
---|---|
Dismisses the bottom sheet. | |
Parameters | |
result? R | Data to be passed back to the bottom sheet opener. |
keydownEvents | |
---|---|
Gets an observable that emits when keydown events are targeted on the overlay. | |
Returns | |
Observable<KeyboardEvent> |