How can I pass the variables year and monthGet to a function in an Angular service from a controller?
Service
myApp.factory('getJsonForCalendarService', function($resource, year, monthGet) {
return $resource(
'../rest/api.php',
{ method: 'getJsonForCalendar', year: year, monthGet:month},
{'query': { method: 'GET', isArray: true }}
);
});
Controller
$scope.getJsonData = getJsonForCalendarService.query(function (response, year, monthGet) {
});