Skip to content

Commit

Permalink
Update ai-chat.component.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
artisticlight authored Jul 30, 2024
1 parent a41ea5e commit fa17187
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/app/components/ai-chat/ai-chat.component.ts
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 {}

0 comments on commit fa17187

Please sign in to comment.