Is there a way to prevent floating point values from being rounded off when used as values for input[type=number]. I cannot use any other type as per requirement.
For example, I cannot bind an input[type=number] with value "3.00", it is automatically rounded off to "3".
I am trying to bind values using angularjs.
angular.module('app', [])
.controller('controller1', ['$scope', function ($scope){
$scope.value=3.00;
}]);
<div ng-app="app" ng-controller="controller1">
<input type="number" ng-model="value" /><br/>
{{value}}<br/>
</div>
this is the link to the PEN : http://codepen.io/cyrilpanicker/pen/aqucJ?editors=101
type="number"...unless you brought in hefty amounts of jquery..type = numberis a requirement, and you want to use float values, then some more information is needed, astype=numberis specifically meant to only use integer values.