using moment.js to format date, put link.js in angular scope function