I cant solve your problem directly, but if you would use a filter for momentFormat instead of a directive, it would work.
see http://jsfiddle.net/P2cu6/6/
angular.module('test').filter('momentFormat', function () {
return function(input, format) {
var regexEpic = /^\d+$/ig;
var val = (regexEpic.test(input)) ? window.parseInt(input) : input;
return moment(val).format(format);
}
});
regards