AngularJS Tutorial - Custom Date Filter 'EEEE, d, M'








The following code shows how to use custom Date Filter 'EEEE, d, M'.

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><!--  w w  w. java  2 s  . c  o m-->
<body>
  <div ng-controller="myController">
    <div>{{ today | date:'EEEE, d, M' }} </div>
  </div>
  <script>
    angular.module('myApp', [])
    .controller('myController', function($scope, $filter) {
      $scope.today = new Date();
    })
  </script>

</body>
</html>

The code above is rendered as follows: