📌  相关文章
📜  属性“名称”没有初始值设定项,并且未在构造函数中明确分配.ts(2564) - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:17.139000             🧑  作者: Mango

代码示例6
@Component({...})
export class Component {
  @Input() myInput: string|undefined;
}

OR

@Component({...})
export class Component {
  @Input() myInput!: string;
}