I can only include AMD modules in my project. Is this AMD module?
So I do this
var hotkeys = require("../node_modules/angular-hotkeys/build/hotkeys.js");
and when I try to use it like
hotkeys.add({
combo: 'up',
description: 'this opens an alert box',
callback: function () {
alert("It Works!!!!!!!!!!!");
}
});
i get an error hotkeys.add is not a function.
I console log hotkeys. In log it says mousetrap
Mousetrap(targetElement) {
var self = this;
targetElement = targetElement || document;
if (!(self instanceof Mousetrap)) {
return new Mousetrap(targetElement);
I can only include AMD modules in my project. Is this AMD module? So I do this
var hotkeys = require("../node_modules/angular-hotkeys/build/hotkeys.js");
and when I try to use it like
i get an error hotkeys.add is not a function.
I console log hotkeys. In log it says mousetrap
How can i use it using the require amd module