Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this a AMD module? #286

Open
ShashankDhasal opened this issue Sep 6, 2018 · 0 comments
Open

Is this a AMD module? #286

ShashankDhasal opened this issue Sep 6, 2018 · 0 comments

Comments

@ShashankDhasal
Copy link

ShashankDhasal commented Sep 6, 2018

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);

How can i use it using the require amd module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant