// custom-dialog.component.ts import { Component } from '@angular/core';
@Component({
selector: 'app-custom-dialog',
template: Hello, world!
,
styles: [
Custom Dialog
.dialog { border: 1px solid black; padding: 10px; background-color: white; width: 300px; height: 200px; }
,
],
})
export class CustomDialogComponent {
close() {
// handle closing the dialog
}
}
// some.component.ts import { Component } from '@angular/core'; import { CustomDialogComponent } from './custom-dialog.component';
@Component({
selector: 'app-some',
template:
,
})
export class SomeComponent {
openDialog() {
const dialogRef = new CustomDialogComponent();
// handle opening the dialog
}
}