Skip to content
mehdi-zarrin edited this page Feb 22, 2015 · 2 revisions

it's better to use $filter in your controllers like below :

.controller('SomeController', function($scope, $filter){ $scope.today = function() { var todayDate = new Date(); $scope.dt = $filter('persianDate')(todayDate, 'yyyy/MM/dd'); }; $scope.today();

Clone this wiki locally