var app = angular.module('pixmall', []); app.controller('myDashboard', function($scope, $http) { app.filter('myRandom', function() { return function (input) { return Math.round(input); } }); <div ng-app="pixmall" ng-controller="myDashboard"> <span>{{30.35 | myRandom}}</span> </div> I want to use the filter to round the number to the nearest whole number but it is not working, I don't know what is wrong