Filter value with mediumDate

Description

The following code shows how to filter value with mediumDate.

Example


<!DOCTYPE html>
<html  ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"></script>
<!--from   w  w w  . j a  va2s.co  m-->
<script type='text/javascript'>
angular.module('myApp', ['ui.bootstrap']);
function Ctrl($scope) {
     $scope.mytime = "1374030547000";
}
</script>


</head>
<body>
  <body ng-app="myApp">
<div ng-controller="Ctrl">
    {{ mytime | date: 'mediumDate' }}
</div>
</body>
</body>
</html>

Click to view the demo





















Home »
  AngularJS »
    AngularJS Example »




Controller
Directives
Expression
Filter
Form
Inject
Scope
Server
Style
Template
Utilities