angular.js format adapted