experience-list.js

angular.module('homepage').
directive('experienceList', function() {
    return {
        restrict: 'E',
        replace: true,
        scope: {
            experiences: '=data'
        },
        templateUrl: 'components/content-components/input/experience-list.html',
        controller: 'experienceListController'
    };
}).
controller('experienceListController', function($scope, Experience) {
    if(!$scope.experiences || $scope.experiences.length === 0) {
        $scope.experiences = [];
        $scope.experiences[0] = new Experience();
    }

    $scope.addExperience = function () {
        var length = $scope.experiences.length;
        $scope.experiences[length] = new Experience();
    };
});