How to format date in angularjs

Angular.js has a built-in date filter. demo You can see the supported date formatsĀ in the source for the date filter. edit: If you’re trying to get the correct format in the datepicker (not clear if you’re using datepicker or just trying to use it’s formatter), those supported format strings are here: https://api.jqueryui.com/datepicker/

SyntaxError: Unexpected token o in JSON at position 1

The JSON you posted looks fine, however in your code, it is most likely not a JSON string anymore, but already a JavaScript object. This means, no more parsing is necessary. You can test this yourself, e.g. in Chrome’s console: JSON.parse() converts the input into a string. The toString() method of JavaScript objects by default returns [object Object], resulting … Read more

SyntaxError: Unexpected token o in JSON at position 1

The JSON you posted looks fine, however in your code, it is most likely not a JSON string anymore, but already a JavaScript object. This means, no more parsing is necessary. You can test this yourself, e.g. in Chrome’s console: JSON.parse() converts the input into a string. The toString() method of JavaScript objects by default returns [object Object], resulting … Read more

nodemon app crashed – waiting for file changes before starting

EDIT After further testing, I have found that this is happening with both gulp and grunt on this app and on the default install of mean.js. I’m running this locally on a Mac. When I running either app using “node server.js” they don’t crash. I’m using a MEAN stack with grunt-nodemon and node is crashing when … Read more