DataStoreSrvc.js

angular.module('homepage').
factory('DataStoreSrvc', function ($localStorage, DataStorage) {
	/**
	 * Store all the data received till now from the server
	 */
	var DataStore = {
		inputs: {}
	};;

	if($localStorage.inputs) {
		DataStore['inputs'] = JSON.parse($localStorage.inputs);
	}
	else {
		DataStore['inputs'] = DataStorage.InputTemplate;
	}

	function getInputData() {
		return DataStore.inputs;
	}

	return {
		getInputData: getInputData
	};
});