When looking at this example, it is clear that it raises an exception and does not recognize the $scope service. How can I properly reference other services from within a service method in this situation?
.factory('newService', function($scope) {
return {
function : function(data) {
$scope.var = 'a';
}
}
})
It seems like this issue might be more related to JavaScript than specifically AngularJS.