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\'}}
{{Date.now() | date:\'yyyy-MM-dd\'}}
You have to create a date object in your controller first:
controller:
function Ctrl($scope) { $scope.date = new Date(); }
view:
{{date | date:'yyyy-MM-dd'}}
JSFiddle example
Angular Date Filter Ref