I got a view in angularjs and I\'m just trying to display the current date(formatted). I thought something like {{Date.now() | date:\'yyyy-MM-dd\'}}
Another way of doing is: In Controller, create a variable to hold the current date as shown below:
var eventsApp = angular.module("eventsApp", []);
eventsApp.controller("EventController", function EventController($scope)
{
$scope.myDate = Date.now();
});
In HTML view,
{{myDate | date : 'yyyy-MM-dd'}}