import {Component} from '@angular/core'; import {MatBottomSheet, MatBottomSheetRef} from '@angular/material/bottom-sheet'; /** * @title Bottom Sheet Overview */ @Component({ selector: 'bottom-sheet-overview-example', templateUrl: 'bottom-sheet-overview-example.html', styleUrls: ['bottom-sheet-overview-example.css'], }) export class BottomSheetOverviewExample { constructor(private _bottomSheet: MatBottomSheet) {} openBottomSheet(): void { this._bottomSheet.open(BottomSheetOverviewExampleSheet); } } @Component({ selector: 'bottom-sheet-overview-example-sheet', templateUrl: 'bottom-sheet-overview-example-sheet.html', }) export class BottomSheetOverviewExampleSheet { constructor(private _bottomSheetRef: MatBottomSheetRef) {} openLink(event: MouseEvent): void { this._bottomSheetRef.dismiss(); event.preventDefault(); } }