Skip to content
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

ScrollSpyElementDirective import causing error in browser. #185

Open
waleed-shahzaib opened this issue Jan 25, 2018 · 1 comment
Open

ScrollSpyElementDirective import causing error in browser. #185

waleed-shahzaib opened this issue Jan 25, 2018 · 1 comment

Comments

@waleed-shahzaib
Copy link

waleed-shahzaib commented Jan 25, 2018

The error says:
Uncaught Error: Type ScrollSpyElementDirective is part of the declarations of 2 modules: ScrollSpyModule and AppModule! Please consider moving ScrollSpyElementDirective to a higher module that imports ScrollSpyModule and AppModule.

I am getting this error in browser, the ScrollSpyElementDirective is imported only one time and added in @NgModule imports metadata.

I am importing these:
import { ScrollSpyModule, ScrollSpyService, ScrollSpyElementDirective } from 'ngx-scrollspy';
Is it OK if I don't import ScrollSpyElementDirective, whether ScrollSpyElementDirective is included in ScrollSpyModule which I've also imported.
Please help. Thanks

@waleed-shahzaib
Copy link
Author

Solved the issue, ScrollSpyElementDirective was not needed to import. ScrollSpyModule already contains it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant