Closed gagandeepgill closed 6 years ago
Hi gagandeepgill,
Is this a specific extension? I'd like to try it out. My vscode doesn't notify me of such errors.
I find it strange that you get a provider error when this library is fully about directives. I have just had a look at the implementation of this particular directive and maybe it might be because of rxjs missing, which I forgot to add to peer dependencies. From v2.0.1 you'll be warned to install rxjs ^5.5.2
.
Do you get any console error too that gives more information than this? Also, if you can get a sample uploaded somewhere I might be able to find out more about your particular issue.
this is what I get from console in chrome and I also have rxjs it up to date.
That's very weird. I'd like to see a full working version to test it myself.
Does your @Module
and @Component
look like the ones in the example?
Your component's module (where you are using it), should have the single ContentsModule
import, component should have nothing special.
YourModule.module.ts
import { ContentsModule } from 'angular-contents';
@NgModule({
imports: [
ContentsModule, // Importing this single module will add all library directives that are required.
],
declarations: [
// Angular Contents requires no declarations.
],
providers: [], // Angular Contents has no providers.
})
export class YourModuleModule { }
You've probably done already, but I encourage you to have a second in-depth look at the example code and see if there's something different in your project. The demo code is the one that is running on GitHub Pages, which is working fine. So if you do just like in the demo it should work well.
I solved the problem, I was using another module for routing apps and I had to import your package in there as well. I wouldn't have looked into it if you haven't told me to look at my modules again.
Thanks for the help!
I'm glad that you managed to solve it! Happy coding :D
I get this error while using contentsLink, I have imported your package correctly. All the other directives work fine but this one is giving me issues.