super-productivity/app/scripts/main-header/main-header-d.js
2017-01-04 18:29:55 +01:00

36 lines
633 B
JavaScript

/**
* @ngdoc directive
* @name superProductivity.directive:mainHeader
* @description
* # mainHeader
*/
(function () {
'use strict';
angular
.module('superProductivity')
.directive('mainHeader', mainHeader);
/* @ngInject */
function mainHeader() {
return {
templateUrl: 'scripts/main-header/main-header-d.html',
bindToController: true,
controller: MainHeaderCtrl,
controllerAs: 'vm',
restrict: 'E',
scope: {}
};
}
/* @ngInject */
function MainHeaderCtrl(Dialogs) {
let vm = this;
vm.openAddTask = () => {
Dialogs('ADD_TASK');
};
}
})();