(function () { 'use strict'; var serviceId = 'eventFactorAdminService'; angular.module('eventFactorAdmin').factory(serviceId, ['user', '$location', eventFactorAdminService]); function eventFactorAdminService(user, $location) { var service = { createBlankFactor: createBlankFactor, setCurrentFactor: setCurrentFactor, getCurrentFactor: getCurrentFactor }; // Set current event type variable var currentFactor; return service; // Function to set the current event type function setCurrentFactor(factor) { currentFactor = factor; } // Function to get the currently stored event type function getCurrentFactor(factor) { return currentFactor; } // Function to create a new blank event type function createBlankFactor() { return { name: '', description: '', color: { primary: '#ffffff', secondary: '#ffffff' }, sections: [], additionalLinks: [], casestudys: [] }; } } })();