I have been attempting to use moment.js in Angularjs to format a date, but it seems like I am running into some issues. Here is the link to my code snippet on jsfiddle http://jsfiddle.net/sed6x5e8/ and below you can find the HTML and JS code that I am working with.
HTML:
<div ng-app="miniapp">
<div ng-controller="Ctrl">
<div>
Actual Date: {{date}}
<br><br>
Formatted Date: {{formattedDate}}
</div>
</div>
</div>
JS:
var $scope;
var app = angular.module('miniapp', [])
function Ctrl($scope) {
$scope.date = '2/13/2015';
$scope.formattedDate = moment($scope.date).format('YYYY-MM-DD');
}