MomentJS adapter for AngularJS
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