You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Leadzero has an infinity loop when use ngmodelChange and parse to float i.c.w. leadzero="true".
In the added Stackblitz example the first input has an infinity loop
. You can 't change the value.
@gerwinbouwhuis
Could you clarify the behavior you expect from leadZero when using it with parseFloat?
The infinite loop occurs because leadZero, under the hood, transforms the number 1 into in model 1.00. After that, an additional calculation with parseFloat is performed, which triggers the same transformation again, resulting in the observed behavior.
@andriikamaldinov1 leadzero gives a string back maybe is it better to give a number back same as when leadzero is false,
i think leadzero is only for display the number in an input.
Hi there!
Leadzero has an infinity loop when use ngmodelChange and parse to float i.c.w. leadzero="true".
In the added Stackblitz example the first input has an infinity loop
. You can 't change the value.
https://stackblitz.com/edit/angular-i1mfkm?file=src%2Fmain.ts
The text was updated successfully, but these errors were encountered: