How send variables year, monthGet function angular service from 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.getJsonForCalendar = getJsonForCalendarService.query(function (response, year, monthGet) {
});