I want to format dates on the client-side using angular date filter. I'd like to do that way, because I use angular in some places of my application and I'd like my dates to be formatted uniformly in the whole app.
What I'm trying to do is:
function formatDatetime(date, format) {
var ngDateFilter = angular.getDateFilter(); //that's what I'm asking about
return ngDateFilter(date, format);
}
I use angular applications only on several pages, but dates are spread over various pages (with and without angular app).