Created
August 5, 2013 05:40
-
-
Save jarcoal/6153740 to your computer and use it in GitHub Desktop.
MomentJS adapter for AngularJS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('moment', []).factory('moment', ['$window', function($window){ | |
return $window.moment; | |
}]).filter('moment', ['moment', function(moment) { | |
return function(dateString, format) { | |
return moment(dateString).format(format); | |
}; | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment