Handling decimals


This is more of an Angular problem that strictly Ionic, but i hope I can get some help here as well.

I have a problem handling decimals. I use a slider with a step of 0.1 to let the user select a value (percent). I am showing the selected value using ng-model. The problem is this value is showed stranged on a few phones I tested (not all and not for all values). Instead of showing 1.7 it shows something like 1.700000000000004. When using some variables I can use toFixed(1), but how can I manage this with ng-model?

Thank you!

Later edit: here is the code on Codepen: http://codepen.io/anon/pen/ZYPQZR

can you post some basic working sample on codepen ?

Yes, sorry, here is the link:

On Codepen, Chrome (ionic serve), Samsung Galaxy 4 works without problem. On Samsung Galaxy S2 and an older Samsung tablet it gets weird on some values (like I said, it shows values like 1.9000000000000004). I know it is a problem with JavaScript decimals, but how can I fix it?