1 "angularCompilerOptions": {
2 // ...
3 "strictPropertyInitialization": false
4 // ...
5 }
6
7
1//inside tsconfig.json file
2"angularCompilerOptions": {
3 // ...
4 "strictPropertyInitialization": false
5 // ...
6 }
1@Component({...})
2export class Component {
3 @Input() myInput: string|undefined;
4}
5
6OR
7
8@Component({...})
9export class Component {
10 @Input() myInput!: string;
11}
12
1@Component({...})
2export class Component {
3 @Input() myInput!: string;
4}
5
1[Solved] Property ‘…’ has no initializer and is not definitely assigned in the constructor