commonsApp.filter("getCompanyProfileUrl", ['Constants', function(Constants) { return function(investorInfo) { var url = Constants.apiUrl + "/" +investorInfo.investor_id + "/" + investorInfo.seo_friendly_company_short_name+"-company-profile"; return {"investor_url" : url, "investor_logo" : investorInfo.investor_logo, investor_name : investorInfo.investor}; }; }]); commonsApp.filter("clickableUrl", ['Constants', function(Constants) { return function(url) { var clickableUrl = url; if (url != undefined && url.length > 0) { if (clickableUrl.indexOf("http") != 0) { if (clickableUrl.indexOf("www.") != 0) { clickableUrl = "http://www." + clickableUrl; } else { clickableUrl = "http://" + clickableUrl; } } } return clickableUrl; }; }]); commonsApp.filter("getCompanyInfoUrl",["urlUtilService", function(urlUtilService) { return function(id, shortName) { var url = urlUtilService.getSEOFriendlyCompanyProfileUrl(shortName, id); return url; }; }]);