Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Displaying Date and Time using AJS -->
- <!DOCTYPE html>
- <html>
- <head>
- <title>Date and Time</title>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.4/angular.min.js" integrity="sha512-fVCjT4t8Rpwq8H9CRtGl2KJGwJZXJJJ5vamhkpcT8UmW+Oe0ZNC2ACO8/virYei0FynS5nbliWfCPVV4NkBrJA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
- </head>
- <body ng-app='myapp'>
- <div ng-controller = 'myCtrl'>
- <p>{{CurrentDate | date: 'dd/MM/yyyy'}}</p>
- <p>{{CurrentDate | date: 'MM/dd/yyyy'}}</p>
- <p>{{CurrentDate | date: 'MM/dd/yyyy HH:mm:ss'}}</p>
- </div>
- </body>
- <script type="text/javascript">
- var app = angular.module('myapp',[]);
- app.controller('myCtrl',['$scope','$http',function($scope,$http)
- {
- $scope.CurrentDate = new Date();
- }]);
- </script>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement