CompanyText.js

angular.module('homepage').
filter('companytext', function() {
	return function(company) {
        var result = '';
        if(company.companyName) {
            result += company.companyName + ' | ';
        }

        if(company.startDate && company.endDate) {
            result += company.startDate + ' to ' + company.endDate;
        }
        return result;
	};
});