function myController($scope,helperService)
{
function getFormattedDT() {
var localDate = "2016-04-04 12:55:55";
var inputDate = helperService.parsedDate(helperService.formatDate(localDate));
}
getFormattedDT();
}
I am getting the error as "TypeError : helperService.formatDate is not a function".
(function (myApp)
{
myApp.service('helperService',['$http','$q','$sce','miscService', function($http,$q,$sce,'miscService') {
function formatDate(dateTime) {
return ....
}
function parsedDate(date) {
return ....
}
}(angular.module('myApp')
But if i keep the function in the myController, then it works well.
How do i call nested methods in injected dependencies of angular.