Skip to content

ScrollSpyElementDirective import causing error in browser. #185

Description

@waleed-shahzaib

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions