Files
Showy/frontend/src/app/core/core.module.ts
T
2025-01-14 17:55:53 +01:00

61 lines
2.0 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 { CollectionService } from './services/collection.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';
import { SearchPopupComponent } from './components/search-popup/search-popup.component';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { SharedModule } from '../shared/shared.module';
import { SearchPopupEntryLineComponent } from './components/search-popup-entry-line/search-popup-entry-line.component';
@NgModule({
declarations: [
SidebarComponent,
NavbarComponent,
SearchPopupComponent,
SearchPopupEntryLineComponent,
],
imports: [
CommonModule,
SharedModule,
RouterModule,
FormsModule,
ReactiveFormsModule,
],
providers: [
TmdbService,
LibraryService,
EntryService,
EntrySeenService,
CollectionService,
ToggleService,
EpisodeService,
EpisodeSeenService,
SeasonService,
ToggleService,
ThemeService,
],
exports: [SidebarComponent, NavbarComponent, SearchPopupComponent],
})
export class CoreModule {
constructor(@Optional() @SkipSelf() parentModule?: CoreModule) {
if (parentModule) {
throw new Error(
'CoreModule is already loaded. Import it in the AppModule only.'
);
}
}
}