Q:

HTML/JS not parsing floats

I have an average and I need to update to the new average whenever the user changes his/her input. Unfortunately, HTML seems to only initiate a change if a int is put in, not a float. More specific:
<input type="number" step="0.01" ng-model="newRating"  max="10" min="0" maxlength="2">
{{averageRating}}

AngularJS:
Parent Controller:
$scope.sumOfRatings is the previous sum of ratings, 
newRating is the rating inputed, 
$scope.volumeOfRatings is the previous number of rating:
$scope.$on('changeRating', function(eventName, newRating) {
    $scope.averageRating = ($scope.sumOfRatings + newRating) / ($scope.volumeOfRatings + 1);
}

Code in Child Controller (parses the user input):       
$scope.$watch('newRating', function(newRating, oldRating) {
    $scope.$emit('changeRating', $scope.newRating);
});

However, this only works when numbers like 3, 10, 8, 5 are parsed. If I type in something like 0.33, or 9.8, this does nothing to the average. Sorry if I mist-typed any code, but I think the main problem is not the AngularJS code, but HTML or AngularJS recognizing changes. I did a console.log(newRating) in the $watch and found it never parsed any decimal inputs (like 8.55), only outputted 8.
How can I parse decimal changes in the HTML? I tried using an ng-repeat directive to no avail.

A:

Remove the max length from input tag.
<input type="number" step="0.01" ng-model="newRating"  max="10" min="0">
{{averageRating}}

