I'm trying to update an objectValue with a JSON callback.
As per the code below, if i leave objectValue.data it only updates the value in the pair. I've tried taking the .data off but then it has no response.
Is there a way i can overwrite completely objectValue with the JSON request i get?
app.service('sharedProperties', function() {
var objectValue = {
'data': 'Click to change'
};
return {
setObject: function(value) {
objectValue.data = value;
},
getObject: function() {
return objectValue;
}
};
});
cheers!