Edit This Code:
<!DOCTYPE html>
<html>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body>

<div ng-app="myApp" ng-controller="nCtrl">

<h1>{{weight | number : 3}} kg</h1>

</div>

<script>
var app = angular.module('myApp', []);
app.controller('nCtrl', function($scope) {
    $scope.weight = 9999;
});
</script>

<p>The weight is written with three decimals.</p>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy