-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Error: No provider for KeyboardService! #94
Comments
Hi, please could you give more info?
Also, which starter/template/skeleton are you using (qdouble's starter, angualrclass, angular-cli.....)? |
angular 4 |
Is 1.4.1 the version of angular-cli? If yes, did you try to compare your config with my official demo here https://github.com/Ks89/angular-modal-gallery/tree/master/demo/angular-cli? Also, try to clean your nod_modules folder and re-run "npm install". |
well, I added a providers to @NgModule in modal-gallery.module.ts
|
Yes, in that way you're simply bypassing a feature introduced with version 3.3.0. I want to help you, but I can't without all information and also a minimal example on Github to test it by myself. This is possibly a bug, but it so weird that I cannot confirm it, because I cannot reproduce this issue. If you check in my repo, I have unit testing + 3 different working example here: https://github.com/Ks89/angular-modal-gallery/tree/master/demo Also, there are other 3 projects with this library inside based on both qdouble's starter HERE and angularclass starter HERE and a personal project HERE. In all this projects I never saw this issue. So, if you want, you should really share a minimal example. Otherwise, It will be impossible for me to help you. |
If you can't share an minimal demo, for instance because you are working for a company and the source code is copyrighted, could you share at least the structure of your app? For instance, where are you importing ModalGallery module, if in the main module/lazy module or in another place.... if his problem happens with AOT or JIT....if you are using angular universal... I mean, some information about what are you doing :) Obviously, this is a desperate solution, because it will be really difficult to understand the problem, but something is better than nothing :) Thank for the patience and I'll hope to find a solution with your help XD |
I have been created a complete new project to replicate this issue, below is the steps for the scenario -> 1.ng new [my-app] <- create new angular 4 project
|
Oh yes, that makes sense! I thought that was weird :) You forgot to add .forRoot(), so KeyboardService will be never available as a service. Please read section "Installation" here: https://ks89.github.io/angular-modal-gallery.github.io/gettingStarted This is a common design pattern for Angular libraries. Hope this will fix your issue. |
Oh yeah, It's my bad : ( |
very good. Issue closed. Yes, I will try to add it to 4.0.0, but I suppose that it will be quite difficult. |
Hi,
I'm not sure why this error keep showing on my console log when using the angular-modal-gallery
Error: No provider for KeyboardService!
The text was updated successfully, but these errors were encountered: