sidebar-template.js

angular.module('homepage').
directive('sidebarTemplate', function () {
    return {
        controller: 'sidebarTemplateController',
        restrict: 'E',
        replace: true,
        scope: {
        	data: '='
        },
        transclude: true,
        templateUrl: 'components/content-components/sidebar/sidebar-template.html'
    };
}).
controller('sidebarTemplateController', function ($scope, DateUtility, GlobalDataService) {
    $scope.currentDate = GlobalDataService.getSelectedDate();
    $scope.isTodaysDate = GlobalDataService.isTodaysDateSelected();
});