/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
devtools/src/app/demo-app/todo/dialog.component.ts
47 строк
1 KB
Sheik Althaf
refactor(devtools): removed standalone: true (#58922)
27 ноя 2024, 20:09
27 ноя 2024, 20:09
96c90a5
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Component, inject} from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose, } from '@angular/material/dialog'; import {MatInputModule} from '@angular/material/input'; import {MatFormFieldModule} from '@angular/material/form-field'; import {FormsModule} from '@angular/forms'; export interface DialogData { animal: string; name: string; } @Component({ selector: 'app-dialog', templateUrl: 'dialog.component.html', imports: [ MatDialogTitle, MatDialogContent, MatFormFieldModule, MatInputModule, FormsModule, MatDialogActions, MatDialogClose, ], }) export class DialogComponent { public dialogRef = inject<MatDialogRef<DialogComponent>>(MatDialogRef); public data = inject<DialogData>(MAT_DIALOG_DATA); onNoClick(): void { this.dialogRef.close(); } }