super-productivity/app-src/scripts/hint/hint-d.js

38 lines
645 B
JavaScript

/**
* @ngdoc directive
* @name superProductivity.directive:hint
* @description
* # hint
*/
(function () {
'use strict';
angular
.module('superProductivity')
.directive('hint', hint);
/* @ngInject */
function hint() {
return {
templateUrl: 'scripts/hint/hint-d.html',
bindToController: true,
controller: HintCtrl,
controllerAs: 'vm',
restrict: 'E',
scope: true
};
}
/* @ngInject */
function HintCtrl($rootScope) {
let vm = this;
vm.deleteHint = () => {
if ($rootScope.r.tomorrowsNote) {
delete $rootScope.r.tomorrowsNote;
}
};
}
})();