(function () { "use strict"; angular.module("enrDetailsPaneModule") .factory("detailsAddressInjector", [function () { return { injectAddressInfo: function(scope, addressJson) { scope.addressOfficeName = addressJson.GENERAL_OFFICE_NAME; scope.addressLine1 = addressJson.FULL_ADDRESS; scope.addressLine2 = addressJson.FULL_ADDRESS_LINE2; scope.addressPhone = addressJson.PHONE; scope.addressPhoneExtensions = addressJson.PHONE_EXT; if (addressJson.CITY === undefined || addressJson.STATE === undefined || addressJson.ZIP === undefined) scope.addressCityStateZip = undefined; else scope.addressCityStateZip = addressJson.CITY + ", " + addressJson.STATE + " " + addressJson.ZIP; } }; }]); }());