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
Simply replacing preformatValue with toFloat seems to fixing the issue for me. But I don't get the idea behind preformatValue and it's not used anywhere else, so maybe there's a better fix for that.
When input is inside a form and form is submitted, the value in the model becomes undefined.
On form submit code execution gets into parser at https://github.com/jstroem/ng-input-currency/blob/master/src/ng-input-currency.js#L75, and
value
is formatted currency string like '$10,000.00'. NextpreformatValue
doesn't expect this kind of string, neither does currency filter, so the function result is undefined.Simply replacing
preformatValue
withtoFloat
seems to fixing the issue for me. But I don't get the idea behindpreformatValue
and it's not used anywhere else, so maybe there's a better fix for that.I've put together a simple plunkr to reproduce this
https://next.plnkr.co/edit/8iRKPjGbhxiCrsPb
The text was updated successfully, but these errors were encountered: