0

I am getting a Circular dependancy error like this - src/app/shared/shared.module.ts -> src/app/shared/index.ts -> src/app/shared/shared.module.ts

index.ts export * from './layout/index'; export * from './shared.module';

shared.module.ts @NgModule({ exports: [ CommonModule, NgSelectModule, FormsModule, ReactiveFormsModule, HttpClientModule, BsDropdownModule, BsDatepickerModule, Ng4GeoautocompleteModule, RouterModule, NgxHmCarouselModule, NgxSpinnerModule, CarouselModule, AccordionModule, AngularGooglePlaceModule, ModalModule, ProgressbarModule, HeaderComponent, FooterComponent, SidebarComponent, PopoverModule, RatingModule, AgmCoreModule, NumberDirective, BootModalComponent, ErrorModalComponent, ]

I am unable to find the circular dependency here. Please help.

  • Check out this. https://stackoverflow.com/questions/46113734/angular-4-circular-dependency-detected – Himanshu Shekhar Nov 23 '18 at 05:52
  • @HimanshuShekhar yeah, I checked that. But in my case shared.module.ts depends on the index.ts and index.ts depends on shared.module.ts. the 2nd dependency will be there otherwise it'll throw error. But don't know about the 1st one – Risitesh Biswal Nov 23 '18 at 06:03
  • Thanks, @HimanshuShekhar. I just solved it as it the header, footer and sidebar component was getting called. – Risitesh Biswal Nov 23 '18 at 06:28

0 Answers0