<!DOCTYPE html>
<html>
<script src="/lib/angular-1.4.8.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>