refactor: API_URL Token und Injektion entfernt

This commit is contained in:
Developer 02 2024-07-22 14:15:44 +02:00
parent f211506832
commit 3a3df2e7f1
2 changed files with 2 additions and 10 deletions

View File

@ -6,7 +6,6 @@ import { provideAnimationsAsync } from '@angular/platform-browser/animations/asy
import { provideHttpClient, withFetch } from '@angular/common/http';
import { APP_BASE_HREF } from '@angular/common';
import { UrlService } from './services/url.service';
import { API_URL } from './tokens';
export const appConfig: ApplicationConfig = {
providers: [
@ -18,11 +17,6 @@ export const appConfig: ApplicationConfig = {
provide: APP_BASE_HREF,
useFactory: (urlService: UrlService) => urlService.getBaseHref(),
deps: [UrlService]
},
{
provide: API_URL,
useFactory: (urlService: UrlService) => urlService.getApiUrl(),
deps: [UrlService]
},
}
]
};

View File

@ -1,3 +1 @@
import { InjectionToken } from '@angular/core';
export const API_URL = new InjectionToken<string>('API_URL');
import { InjectionToken } from '@angular/core';