omridevk / ng-keyboard-shortcuts

Dead Simple Keyboard Shortcuts Management for Angular

Home Page:https://ng-keyboard-shortcuts.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support angular 7 in the new versions

sygi opened this issue · comments

Describe the bug
I am using angular 7. When I installed 9.0.0. of ng-keyboard-shortcuts I got the following error when importing the module:

Uncaught TypeError: core.ɵɵdefineInjectable is not a function
    at modules.js?hash=52f736c0bde845d06d36767e97e5a9901832c3a0:172358
    at modules.js?hash=52f736c0bde845d06d36767e97e5a9901832c3a0:172366
    at modules.js?hash=52f736c0bde845d06d36767e97e5a9901832c3a0:171568
    at ng-keyboard-shortcuts.umd.js (modules.js?hash=52f736c0bde845d06d36767e97e5a9901832c3a0:171571)
    at fileEvaluate (modules-runtime.js?hash=d3c3e5d67c95f97a60888bda7373292efad3be5e:346)
    at Module.require

When I installed version 7.1.3 of ng-keyboard-shortcuts, the library works as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Use Angular in version "7.2.16"
  2. install ng-keyboard-shortcuts as `npm install -S ng-keyboard-shortcuts".

Desktop (please complete the following information):
Vivaldi | 2.11.1811.38 (Stable channel) (64-bit)
Revision | 9238efe45704ece191a76e3bb210e3fe6716ccb2
OS | Linux
JavaScript | V8 8.0.426.19
User Agent | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.107 Safari/537.36
Command Line | /usr/bin/vivaldi-stable --flag-switches-begin --flag-switches-end --disable-webrtc-apm-in-audio-service --save-page-as-mhtml
Executable Path | /opt/vivaldi/vivaldi

Additional context
The regression was introduced in version 8.2.0.

commented

@sygi
Thank you for reporting the issue.
I will address this ASAP.

commented

@sygi
unfortunately, there were breaking changes between angular 7 and 8/9.
What I am going to do this week is release a new version 7.0.x with all the new features just compiled to angular v7, this should resolve the issue.
You will still need to install the specific version as npm install ng-keyboard-shortcuts will give you the latest version.

commented

for now, most of the important features also exists on the 8.2.0 I believe. so if you could use this while I create the v7 with all the latest features and update the README accordingly.
Thanks again for reporting the issue.

Thank you for taking look at this issue so promptly.

For me personally, the only feature missing in 7.1.3. is a working "plus" button (#49 . Unless I missed something when testing, 8.2.0. didn't work on angular 7 either.

commented

@sygi
Happy to help, and thank you again for reporting the issue as I was not aware of this.
Yes that is why it is important to me to get a working version 7 with all bug fixes and features added.
I'll try to get it it as soon as possible, thank you for your patience

commented

@sygi
I have released https://www.npmjs.com/package/ng-keyboard-shortcuts/v/7.1.10
Which includes all the latest features and bug fixes that version 9 has but was compiled using angular 7 CLI.
I have verified on my end that it is indeed solved.
Please let me know if the issue persist. closing for now
Will also add a version 8 with same procedure.