Angular is a platform and framework for building single-page client applications using HTML and TypeScript.
How to reproduce it
@Input() parentData: string;
Error
Property 'parentData' has no initializer and is not definitely assigned in the constructor.
Solution #1
Add the ! because the input is expecting the value to be passed. In this case, there is no default value. The exclamation point is called the non-null assertion operator and it tells the TypeScript compiler that the value of this property won’t be null or undefined.
@Input() parentData!: string;
Solution #2
Use the ?.
@Input() parentData?: string;