The markup (Jade)
.col-md-9
| {{client.person.date_of_birth | date:'standardDate'}}
The filter (angular)
.filter('standardDate', function($filter){
var dateFilter = $filter('date');
return function(date) {
return dateFilter(date, 'MM dd yyyy');
}
})
The filtered date it returns:
0nStAMn16AMr16DAMte
When I use one of angular's preset date formatters (e.g. 'shortdate'), this works, suggesting the date param is not the problem.
No need to pass in the date
filter, as your standardDate
filter already brings in the $filter
service and returns the filtered date all on its own.
So, your markup should look like this:
.col-md-9
| {{client.person.date_of_birth | standardDate }}