There's a plethora of information regarding getting data from a service and using it in the controller, but I have scoured the internet and found no examples of or explanations on how to do this. If I have a basic controller:
app.controller('myController', function($scope) {
$scope.myObject = [
{
x = 1;
y = 2;
},
{
x = 3;
y = 4;
}]
});
I would like to write a service that would take the object "myObject" from the controller, alter the object, and send it back to the controller. I understand how to write services and get the information TO a controller, but how can a service access the object "myObject"?