How i can get the current date with a specific format \'yyyy-MM-dd\', for today by example i with that the result be: \'2018-07-12\', with using just the command
<
In Controller ,
var DateObj = new Date(); $scope.YourParam = DateObj.getFullYear() + '-' + ('0' + (DateObj.getMonth() + 1)).slice(-2) + '-' + ('0' + DateObj.getDate()).slice(-2);