mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 22:43:03 +00:00
18 lines
369 B
TypeScript
18 lines
369 B
TypeScript
import { InjectionToken } from '@angular/core';
|
|
|
|
export const NativeWindowService = new InjectionToken('NativeWindowService');
|
|
|
|
export class NativeWindowRef {
|
|
get nativeWindow(): any {
|
|
if (typeof window !== 'undefined') {
|
|
return window;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
export function NativeWindowFactory() {
|
|
return new NativeWindowRef();
|
|
}
|