Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Is this a AMD module? #286

@ShashankDhasal

Description

@ShashankDhasal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions