#Using input with nullsafe typescript
1 messages · Page 1 of 1 (latest)
or
@Input() user: User | null
in your declaration, your user has no initialization, so in the end you initialize it to null, although you inject your user via your component, but the declaration remains on a null initialization
so, you can declare : User | null
or configure your nullStrictCheck 🙂
strictNullChecks *
refer to this https://angular.io/guide/template-typecheck