我似乎无法理解问题是什么,但只有1个文件报告装饰器的实验支持在未来发布警告中可能会发生变化。除了报告此内容的所有文件并编辑tsconfig文件之外,我一直无法找到任何SO线程。
我可能遗失的任何东西?我已经使用装饰器创建了其他文件,但没有收到此错误。
有问题的文件如下所示:
import { Component, ViewChild, Inject } from '@angular/core';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
import { Client } from '../models/client.model';
import { ClientEditorComponent } from './client-editor.component';
@Component({
selector: 'app-edit-client-dialog',
templateUrl: 'edit-client-dialog.component.html',
styleUrls: ['edit-client-dialog.component.scss']
})
export class EditClientDialogComponent
{
@ViewChild(ClientEditorComponent)
editClient: ClientEditorComponent;
get clientName(): any {
return this.data.client ? { name: this.data.client.client_Name } : null;
}
constructor(
public dialogRef: MatDialogRef<EditClientDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: { client: Client }
) {
console.log(this.data.client);
console.log(this.data.client.client_Name);
}
ngAfterViewInit() {
console.log(this.data.client);
this.editClient.clientSaved$.subscribe(client => this.dialogRef.close(client));
}
cancel(): void {
console.log(this.data.client);
this.dialogRef.close(null);
}
}