Revert "refactor: API_URL Token und Injektion entfernt"
This reverts commit 3a3df2e7f16f2327a0b462b8496e957f8a99084b.
This commit is contained in:
parent
482a78207e
commit
a509583210
@ -6,6 +6,7 @@ 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: [
|
||||
@ -17,6 +18,11 @@ 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]
|
||||
},
|
||||
]
|
||||
};
|
||||
@ -1 +1,3 @@
|
||||
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