I have a component which accepts an @Input
like this:
@Input() thing:Thing; // error!
This is passed to the component in the usual manner:
<my-component [thing]="thatThing"></my-component>
I think because of strict mode, I get the following compiler error: Property 'thing' has no initializer and is not definitely assigned in the constructor.
Is there a way to get rid of that without filling with dummy data and while keeping strict mode (if that is indeed the cause), and just rely on the input being populated from whoever is instantiating the component? I don't really have a default value to assign to thing
, and null
or undefined
don't seem to work, either.