Check out this sample demo that I've put together.
In the code, I'm passing a value of ipNumber = '99';
to the component HelloComponent
.
The issue arises with the @Input
, which is defined as
@Input() someVal : number;
I aim to receive an error when a string is passed through @Input.
To resolve this, the correct input should be
ipNumber = 99;
Instead of
ipNumber = '99';