-
Notifications
You must be signed in to change notification settings - Fork 50
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
Cannot find module "./ng2-slider.component.html" #12
Comments
The toturial isn't complete, so you have to do the following. If your using the latest version of angular go to package.json and make sure under dependencies it has:
and in your systemjs.config.js :
it should work after that |
Thanks for the response. I must be doing something wrong though (I'm using webpack). I've made sure all dependencies are included in packages.json, and the import seems to work fine (the module is recognised). However, I still end up with a "Can't bind to 'normalHandlerStyle' since it isn't a known property of 'ng2-slider'" error. And if I remove binders then a "No provider for ViewContainerRef!" error. So it seems that the component is not being provided. |
Having problems loading it with JSPM too (/ng2-slider.component.html 404 (Not Found)) EDIT: Is this lib working with the newest ng2 release? |
The same problem as in @bonaparte89 |
At app.module.ts try:
I'm using systemjs.config.js and that way works for me. |
For those who are using systemjs.config.js too:
|
Thanks @ricardovillar. But (similar to #18) I now get the following error
|
HI, I have the same problem. I've created my app with angular-cli (so I believe it is using webpack). I'm import with:
In package.json I have
|
Hi, same issue as above. I see error "Error: moduleId should be a string in "Ng2SliderComponent". See https://goo.gl/wIDDiL for more information." on console. The error message doesn't make any sense to me. Some solution would be help, i am using webpack. |
Hi, same as above (Error: moduleId should be a string in "Ng2SliderComponent) angular-cli project |
And same for me too. "Error: moduleId should be a string in "Ng2SliderComponent". See https://goo.gl/wIDDiL for more information. If you're using Webpack you should inline the template and the styles" |
"Error: moduleId should be a string in "Ng2SliderComponent" - Same as above... angular-cli project |
We can get rid of the error: moduleId should be a string by: 1.Traverse to the node_modules\ng2-slider-component\ng2-slider.component.js |
I had the same problem, thanks for your help rach12345. Now it works correctly. |
With Angular CLI, after doing the above, fixing module.id error, I am now getting:
|
For those also experiencing this in NG4, the problem was in a dependency
More info about it here: angular/angular#8277 This does mean that you will need a local copy of both directives and the component copied locally with updated references in each of those as well as in your |
I am confused, does this package work? rach12345 advises to actually go in the code and change the moduleID. Even if this does indeed fix the problem, i am concerned that the code may not be 'production ready.' Has anyone got this widget to work? |
I get the above error when using the ng2-slider on RC5.
the ng2-slider is imported as:
import { Ng2SliderComponent } from "ng2-slider-component/ng2-slider.component";
and included in my component's providers
If I add the component "manually" (with correct path to ng2-slider.component.html) I get
"No provider for ViewContainerRef!"
The text was updated successfully, but these errors were encountered: