app.service(‘dataService’, function() {
var dataSet = [];

var addData = function(newData) {
dataSet.push(newData);
};

var getData = function(){
return dataSet;
};

return {
addData: addData,
getData: getData
};

});

Leave a Reply

Your email address will not be published. Required fields are marked *