I recently upgraded my app to Angular 1.5.8 and am gradually converting my controllers and directives to components. In my directives I was doing:
hotkeys.bindTo(scope)
.add(
{
combo: 'p f',
description: 'Create a forecast for a project',
callback: function () {
vm.openGroup = true;
vm.edit();
}
}
)
This no longer works with a component's controller. For now I'm just going to use the $onDestroy lifecycle hook to remove the hotkeys, but this will get tedious, especially on pages with lots and lots of hotkeys. Thoughts?
P.S. It also looks like chaining adds no longer works, unless I'm missing something.
Hi folks,
I recently upgraded my app to Angular 1.5.8 and am gradually converting my controllers and directives to components. In my directives I was doing:
This no longer works with a component's controller. For now I'm just going to use the $onDestroy lifecycle hook to remove the hotkeys, but this will get tedious, especially on pages with lots and lots of hotkeys. Thoughts?
P.S. It also looks like chaining adds no longer works, unless I'm missing something.
Thanks so much, this is a great directive!