-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a41ea5e
commit fa17187
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,35 @@ | ||
import {ChangeDetectionStrategy, Component, inject} from '@angular/core'; | ||
import {MatButtonModule} from '@angular/material/button'; | ||
import {MatDialog, MatDialogModule} from '@angular/material/dialog'; | ||
|
||
/** | ||
* @title Dialog with header, scrollable content and actions | ||
*/ | ||
@Component({ | ||
selector: 'dialog-content-example', | ||
templateUrl: 'dialog-content-example.html', | ||
standalone: true, | ||
imports: [MatButtonModule, MatDialogModule], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class DialogContentExample { | ||
readonly dialog = inject(MatDialog); | ||
|
||
openDialog() { | ||
const dialogRef = this.dialog.open(DialogContentExampleDialog); | ||
|
||
dialogRef.afterClosed().subscribe(result => { | ||
console.log(`Dialog result: ${result}`); | ||
}); | ||
} | ||
} | ||
|
||
@Component({ | ||
selector: 'dialog-content-example-dialog', | ||
templateUrl: 'dialog-content-example-dialog.html', | ||
standalone: true, | ||
imports: [MatDialogModule, MatButtonModule], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class DialogContentExampleDialog {} | ||
|