AngularJS Tutorial - Filter number as date








The following code shows how to . Filter number as date.

Example


<!--   w w w.  j  av a  2  s.c om-->
<!DOCTYPE html>
<html  ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"></script>
<body ng-app="myApp">
  <div ng-controller="MyCtrl">
  Hello, {{name}}!
  {{ 5000 | date:'HH:mm:ss' }}
</div>
<script type='text/javascript'>

var myApp = angular.module('myApp',[]);

//myApp.directive('myDirective', function() {});
//myApp.factory('myService', function() {});

function MyCtrl($scope) {
    $scope.name = 'Superhero';
}
</script>
</body>
</html>

The code above is rendered as follows: