Angular Material input reusable - Type number

294 Views Asked by At

I'm trying to create a reusable matInput with controlValueAccessor. When I pass the type with @Input(), I got the good behavior but my data number is convert in string. I create a stackblitz

https://stackblitz.com/edit/angular-ivy-fetwzt

Open the console too see the behavior.

I don't understand why my input as the good behavior but i got a string.

I want to create a reusable input with "type" dynamic and got a number when a pass type=number.

Thanks !

0

There are 0 best solutions below