EducationText.js

angular.module('homepage').
filter('educationtext', function() {
	return function(education) {
        var result = '';
        if(education.educationTitle) {
            result += education.educationTitle;
        }

        if(education.studiedFrom) {
            result += ' | ' + education.studiedFrom;
        }

        if(education.startDate && education.endDate) {
            result += ' | ' + education.startDate + ' to ' + education.endDate;
        }

		if(education.specialization) {
            result += ' | ' + education.specialization;
        }

		if(education.score) {
            result += ' | ' + education.score;
        }
        return result;
	};
});