F: add config service
This commit is contained in:
1 parent
5dc5a023b8
commit
13f68fcac6
2 files changed
+30
-6
No files matched your search
@@ -19,6 +19,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|||||||
import { SharedModule } from '../shared/shared.module';
|
import { SharedModule } from '../shared/shared.module';
|
||||||
import { SearchPopupEntryLineComponent } from './components/search-popup-entry-line/search-popup-entry-line.component';
|
import { SearchPopupEntryLineComponent } from './components/search-popup-entry-line/search-popup-entry-line.component';
|
||||||
import { ScrollService } from './services/scroll.service';
|
import { ScrollService } from './services/scroll.service';
|
||||||
|
import { ConfigService } from './services/config.service';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
@@ -35,16 +36,17 @@ import { ScrollService } from './services/scroll.service';
|
|||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
TmdbService,
|
|
||||||
LibraryService,
|
|
||||||
EntryService,
|
|
||||||
EntrySeenService,
|
|
||||||
CollectionService,
|
CollectionService,
|
||||||
ToggleService,
|
EntrySeenService,
|
||||||
EpisodeService,
|
EntryService,
|
||||||
EpisodeSeenService,
|
EpisodeSeenService,
|
||||||
|
EpisodeService,
|
||||||
|
LibraryService,
|
||||||
SeasonService,
|
SeasonService,
|
||||||
|
|
||||||
|
TmdbService,
|
||||||
|
|
||||||
|
ConfigService,
|
||||||
ScrollService,
|
ScrollService,
|
||||||
ToggleService,
|
ToggleService,
|
||||||
ThemeService,
|
ThemeService,
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { environment } from '../../../environments/environment';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root',
|
||||||
|
})
|
||||||
|
export class ConfigService {
|
||||||
|
constructor() {}
|
||||||
|
|
||||||
|
public getBackendApiUrl(): string {
|
||||||
|
return environment.API_URL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public getTmdbApiUrl(): string {
|
||||||
|
return environment.TMDB_API_URL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public getTmdbApiKey(): string {
|
||||||
|
return environment.TMDB_API_KEY;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in new issue
Block a user