mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-11 12:03:03 +00:00
Removed providedIn attribute for services that don't need
This commit is contained in:
@@ -54,7 +54,7 @@ export const IMPERSONATING_COOKIE = 'dsImpersonatingEPerson';
|
|||||||
/**
|
/**
|
||||||
* The auth service.
|
* The auth service.
|
||||||
*/
|
*/
|
||||||
@Injectable({providedIn: 'root'})
|
@Injectable()
|
||||||
export class AuthService {
|
export class AuthService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -14,7 +14,7 @@ import { RemoteData } from '../data/remote-data';
|
|||||||
/**
|
/**
|
||||||
* The auth service.
|
* The auth service.
|
||||||
*/
|
*/
|
||||||
@Injectable({providedIn: 'root'})
|
@Injectable()
|
||||||
export class ServerAuthService extends AuthService {
|
export class ServerAuthService extends AuthService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -24,9 +24,7 @@ export enum LANG_ORIGIN {
|
|||||||
/**
|
/**
|
||||||
* Service to provide localization handler
|
* Service to provide localization handler
|
||||||
*/
|
*/
|
||||||
@Injectable({
|
@Injectable()
|
||||||
providedIn: 'root'
|
|
||||||
})
|
|
||||||
export class LocaleService {
|
export class LocaleService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -4,7 +4,7 @@ import { combineLatest, Observable, of as observableOf } from 'rxjs';
|
|||||||
import { map, mergeMap, take } from 'rxjs/operators';
|
import { map, mergeMap, take } from 'rxjs/operators';
|
||||||
import { isEmpty, isNotEmpty } from '../../shared/empty.util';
|
import { isEmpty, isNotEmpty } from '../../shared/empty.util';
|
||||||
|
|
||||||
@Injectable({providedIn: 'root'})
|
@Injectable()
|
||||||
export class ServerLocaleService extends LocaleService {
|
export class ServerLocaleService extends LocaleService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -17,7 +17,7 @@ export interface ICookieService {
|
|||||||
remove(name: string, options?: CookieAttributes): void;
|
remove(name: string, options?: CookieAttributes): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Injectable({providedIn: 'root'})
|
@Injectable()
|
||||||
export abstract class CookieService implements ICookieService {
|
export abstract class CookieService implements ICookieService {
|
||||||
protected readonly cookieSource = new Subject<{ readonly [key: string]: any }>();
|
protected readonly cookieSource = new Subject<{ readonly [key: string]: any }>();
|
||||||
public readonly cookies$ = this.cookieSource.asObservable();
|
public readonly cookies$ = this.cookieSource.asObservable();
|
||||||
|
@@ -29,6 +29,7 @@ import {
|
|||||||
locationProvider,
|
locationProvider,
|
||||||
LocationToken
|
LocationToken
|
||||||
} from '../../app/core/services/browser-hard-redirect.service';
|
} from '../../app/core/services/browser-hard-redirect.service';
|
||||||
|
import { LocaleService } from '../../app/core/locale/locale.service';
|
||||||
|
|
||||||
export const REQ_KEY = makeStateKey<string>('req');
|
export const REQ_KEY = makeStateKey<string>('req');
|
||||||
|
|
||||||
@@ -90,6 +91,10 @@ export function getRequest(transferState: TransferState): any {
|
|||||||
provide: SubmissionService,
|
provide: SubmissionService,
|
||||||
useClass: SubmissionService
|
useClass: SubmissionService
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
provide: LocaleService,
|
||||||
|
useClass: LocaleService
|
||||||
|
},
|
||||||
{
|
{
|
||||||
provide: HardRedirectService,
|
provide: HardRedirectService,
|
||||||
useClass: BrowserHardRedirectService,
|
useClass: BrowserHardRedirectService,
|
||||||
|
Reference in New Issue
Block a user