mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Merge branch 'Hard-redirect-after-log-in' into w2p-72635_cookie-preferences
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
import { Inject, Injectable } from '@angular/core';
|
import { Inject, Injectable, InjectionToken } from '@angular/core';
|
||||||
import { LocationToken } from '../../../modules/app/browser-app.module';
|
|
||||||
import { HardRedirectService } from './hard-redirect.service';
|
import { HardRedirectService } from './hard-redirect.service';
|
||||||
|
|
||||||
|
export const LocationToken = new InjectionToken('Location');
|
||||||
|
|
||||||
|
export function locationProvider(): Location {
|
||||||
|
return window.location;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Service for performing hard redirects within the browser app module
|
* Service for performing hard redirects within the browser app module
|
||||||
*/
|
*/
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { HttpClient, HttpClientModule } from '@angular/common/http';
|
import { HttpClient, HttpClientModule } from '@angular/common/http';
|
||||||
import { InjectionToken, NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule, makeStateKey, TransferState } from '@angular/platform-browser';
|
import { BrowserModule, makeStateKey, TransferState } from '@angular/platform-browser';
|
||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { RouterModule } from '@angular/router';
|
import { RouterModule } from '@angular/router';
|
||||||
@@ -24,7 +24,10 @@ import { StatisticsModule } from '../../app/statistics/statistics.module';
|
|||||||
import { BrowserKlaroService } from '../../app/shared/cookies/browser-klaro.service';
|
import { BrowserKlaroService } from '../../app/shared/cookies/browser-klaro.service';
|
||||||
import { KlaroService } from '../../app/shared/cookies/klaro.service';
|
import { KlaroService } from '../../app/shared/cookies/klaro.service';
|
||||||
import { HardRedirectService } from '../../app/core/services/hard-redirect.service';
|
import { HardRedirectService } from '../../app/core/services/hard-redirect.service';
|
||||||
import { BrowserHardRedirectService } from '../../app/core/services/browser-hard-redirect.service';
|
import {
|
||||||
|
BrowserHardRedirectService,
|
||||||
|
LocationToken, locationProvider
|
||||||
|
} from '../../app/core/services/browser-hard-redirect.service';
|
||||||
|
|
||||||
export const REQ_KEY = makeStateKey<string>('req');
|
export const REQ_KEY = makeStateKey<string>('req');
|
||||||
|
|
||||||
@@ -36,12 +39,6 @@ export function getRequest(transferState: TransferState): any {
|
|||||||
return transferState.get<any>(REQ_KEY, {});
|
return transferState.get<any>(REQ_KEY, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
export const LocationToken = new InjectionToken('Location');
|
|
||||||
|
|
||||||
export function locationProvider(): Location {
|
|
||||||
return window.location;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
bootstrap: [AppComponent],
|
bootstrap: [AppComponent],
|
||||||
imports: [
|
imports: [
|
||||||
|
Reference in New Issue
Block a user