(function () { 'use strict'; var serviceId = 'userSettingsService'; angular.module('userSettings').factory(serviceId, [userSettingsService]); function userSettingsService() { var service = { newSocialMedia: newSocialMedia, newEmailAddress: newEmailAddress, newTelephone: newTelephone, newAddress: newAddress, }; return service; function newSocialMedia() { return { type: null, url: null } } function newEmailAddress() { return { email: null, emailAddressType: null, primary: false, isNew: true } } function newTelephone() { return { number: null, type: null, primary: false } } function newAddress() { return { line1: null, line2: null, line3: null, town: null, city: null, region: null, postCode: null, type: null, primary: null, } } } })();