diff --git a/src/app/core/auth/auth.service.ts b/src/app/core/auth/auth.service.ts index 6c1efb4a8f..b6529aa9ca 100644 --- a/src/app/core/auth/auth.service.ts +++ b/src/app/core/auth/auth.service.ts @@ -54,7 +54,7 @@ export const IMPERSONATING_COOKIE = 'dsImpersonatingEPerson'; /** * The auth service. */ -@Injectable({providedIn: 'root'}) +@Injectable() export class AuthService { /** diff --git a/src/app/core/auth/server-auth.service.ts b/src/app/core/auth/server-auth.service.ts index baba9072c0..9840b22267 100644 --- a/src/app/core/auth/server-auth.service.ts +++ b/src/app/core/auth/server-auth.service.ts @@ -14,7 +14,7 @@ import { RemoteData } from '../data/remote-data'; /** * The auth service. */ -@Injectable({providedIn: 'root'}) +@Injectable() export class ServerAuthService extends AuthService { /** diff --git a/src/app/core/locale/locale.service.ts b/src/app/core/locale/locale.service.ts index a31862ed32..22e0285e6d 100644 --- a/src/app/core/locale/locale.service.ts +++ b/src/app/core/locale/locale.service.ts @@ -24,9 +24,7 @@ export enum LANG_ORIGIN { /** * Service to provide localization handler */ -@Injectable({ - providedIn: 'root' -}) +@Injectable() export class LocaleService { /** diff --git a/src/app/core/locale/server-locale.service.ts b/src/app/core/locale/server-locale.service.ts index a588be1a0a..f438643e49 100644 --- a/src/app/core/locale/server-locale.service.ts +++ b/src/app/core/locale/server-locale.service.ts @@ -4,7 +4,7 @@ import { combineLatest, Observable, of as observableOf } from 'rxjs'; import { map, mergeMap, take } from 'rxjs/operators'; import { isEmpty, isNotEmpty } from '../../shared/empty.util'; -@Injectable({providedIn: 'root'}) +@Injectable() export class ServerLocaleService extends LocaleService { /** diff --git a/src/app/core/services/cookie.service.ts b/src/app/core/services/cookie.service.ts index b14d782c76..0098e3ace4 100644 --- a/src/app/core/services/cookie.service.ts +++ b/src/app/core/services/cookie.service.ts @@ -17,7 +17,7 @@ export interface ICookieService { remove(name: string, options?: CookieAttributes): void; } -@Injectable({providedIn: 'root'}) +@Injectable() export abstract class CookieService implements ICookieService { protected readonly cookieSource = new Subject<{ readonly [key: string]: any }>(); public readonly cookies$ = this.cookieSource.asObservable(); diff --git a/src/modules/app/browser-app.module.ts b/src/modules/app/browser-app.module.ts index 40a77a49ae..3aa6bf244b 100644 --- a/src/modules/app/browser-app.module.ts +++ b/src/modules/app/browser-app.module.ts @@ -29,6 +29,7 @@ import { locationProvider, LocationToken } from '../../app/core/services/browser-hard-redirect.service'; +import { LocaleService } from '../../app/core/locale/locale.service'; export const REQ_KEY = makeStateKey('req'); @@ -90,6 +91,10 @@ export function getRequest(transferState: TransferState): any { provide: SubmissionService, useClass: SubmissionService }, + { + provide: LocaleService, + useClass: LocaleService + }, { provide: HardRedirectService, useClass: BrowserHardRedirectService,