46 lines
1.5 KiB
TypeScript
46 lines
1.5 KiB
TypeScript
import { NgModule, Optional, SkipSelf } from '@angular/core';
|
|
import { CommonModule } from '@angular/common';
|
|
|
|
import { TmdbService } from './services/tmdb.service';
|
|
import { LibraryService } from './services/library.service';
|
|
import { EntryService } from './services/entry.service';
|
|
import { UserCollectionService } from './services/userCollection.service';
|
|
import { ToggleService } from './services/toggle.service';
|
|
import { SidebarComponent } from './components/sidebar/sidebar.component';
|
|
import { NavbarComponent } from './components/navbar/navbar.component';
|
|
import { RouterModule } from '@angular/router';
|
|
import { EntrySeenService } from './services/entry-seen.service';
|
|
import { EpisodeService } from './services/episode.service';
|
|
import { EpisodeSeenService } from './services/episode-seen.service';
|
|
import { ThemeService } from './services/theme.service';
|
|
import { SeasonService } from './services/season.service';
|
|
|
|
@NgModule({
|
|
declarations: [SidebarComponent, NavbarComponent],
|
|
imports: [CommonModule, RouterModule],
|
|
providers: [
|
|
TmdbService,
|
|
LibraryService,
|
|
EntryService,
|
|
EntrySeenService,
|
|
UserCollectionService,
|
|
ToggleService,
|
|
EpisodeService,
|
|
EpisodeSeenService,
|
|
SeasonService,
|
|
|
|
ToggleService,
|
|
ThemeService,
|
|
],
|
|
exports: [SidebarComponent, NavbarComponent],
|
|
})
|
|
export class CoreModule {
|
|
constructor(@Optional() @SkipSelf() parentModule?: CoreModule) {
|
|
if (parentModule) {
|
|
throw new Error(
|
|
'CoreModule is already loaded. Import it in the AppModule only.'
|
|
);
|
|
}
|
|
}
|
|
}
|