Skip to content

JanSchuermannPH/momentFilter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#AngularJS Moment.js Filter

Installation

AngularJS Moment.js Filter is available on bower:

bower install --save js-angular-moment-filter

Usage

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published