What happens when you declare a getterSetter function, this function is called every time you change the input value.
So, when you write "12.", the function is called, but it is not a real number, so it takes out the ".". to provide a valid value.
Try typing “123,” and then add “.”. between numbers like "12.3" that works!
Edit
I fixed my code, now it works.
Try the following:
$scope.amount = function(newValue) { return arguments.length ? ($scope._amount = newValue) : $scope._amount; };
Here is a forked plunkr: http://plnkr.co/edit/xZtZLH5He4ZnjkqhFApY?p=preview
source share