#AngularJS Moment.js Filter
AngularJS Moment.js Filter is available on bower:
bower install --save js-angular-moment-filter
Apply the filter using the default formatting:
<span>{{ date | moment }}</span>
Result: 04/20/2016, 9:39 PM
Apply the filter using custom formatting:
<span>{{ date | moment:'MM/DD/Y' }}</span>
Result: 04/20/2016
Set a different default formatting
app.config(function(momentFilterProvider){
momentFilterProvider.defaultFormat('dddd, MMMM Do YYYY, h:mm:ss a');
});
<span>{{ date | moment }}</span>
Result: Wednesday, April 20th 2016, 9:47:43 pm