Padded minute in hour Date Filter

Description

The following code shows how to use 'Padded minute in hour' Date Filter.

Example


<!doctype html>
<html ng-app="myApp">
<head>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.2/angular.js"></script>
</head><!--from   w  w  w  .j a v a  2 s .c om-->
<body>
  <div ng-controller="myController">
    <div>Padded minute in hour: {{ today | date:'mm' }} </div>
  </div>
  <script>
    angular.module('myApp', [])
    .controller('myController', function($scope, $filter) {
      $scope.today = new Date();
    })
  </script>

</body>
</html>

Click to view the demo





















Home »
  AngularJS »
    AngularJS Tutorial »




Introduction
Buildin Filters
Buildin Directives