Reapply "refactor: API_URL Token und Injektion entfernt"
This reverts commit a5095832109f4185acd2f3d6eac61835b444a91a.
This commit is contained in:
parent
a509583210
commit
f329340c7f
@ -6,7 +6,6 @@ import { provideAnimationsAsync } from '@angular/platform-browser/animations/asy
|
|||||||
import { provideHttpClient, withFetch } from '@angular/common/http';
|
import { provideHttpClient, withFetch } from '@angular/common/http';
|
||||||
import { APP_BASE_HREF } from '@angular/common';
|
import { APP_BASE_HREF } from '@angular/common';
|
||||||
import { UrlService } from './services/url.service';
|
import { UrlService } from './services/url.service';
|
||||||
import { API_URL } from './tokens';
|
|
||||||
|
|
||||||
export const appConfig: ApplicationConfig = {
|
export const appConfig: ApplicationConfig = {
|
||||||
providers: [
|
providers: [
|
||||||
@ -18,11 +17,6 @@ export const appConfig: ApplicationConfig = {
|
|||||||
provide: APP_BASE_HREF,
|
provide: APP_BASE_HREF,
|
||||||
useFactory: (urlService: UrlService) => urlService.getBaseHref(),
|
useFactory: (urlService: UrlService) => urlService.getBaseHref(),
|
||||||
deps: [UrlService]
|
deps: [UrlService]
|
||||||
},
|
}
|
||||||
{
|
|
||||||
provide: API_URL,
|
|
||||||
useFactory: (urlService: UrlService) => urlService.getApiUrl(),
|
|
||||||
deps: [UrlService]
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -1,3 +1 @@
|
|||||||
import { InjectionToken } from '@angular/core';
|
import { InjectionToken } from '@angular/core';
|
||||||
|
|
||||||
export const API_URL = new InjectionToken<string>('API_URL');
|
|
||||||
Loading…
x
Reference in New Issue
Block a user