mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 15:03:07 +00:00
[DURACOM-240] split service into SSR and CSR
This commit is contained in:

committed by
Giuseppe Digilio

parent
68c9ef1051
commit
e402ac482d
49
src/app/core/shared/server-math.service.ts
Normal file
49
src/app/core/shared/server-math.service.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Observable,
|
||||
ReplaySubject,
|
||||
Subject,
|
||||
} from 'rxjs';
|
||||
|
||||
import {
|
||||
MathJaxConfig,
|
||||
MathService,
|
||||
} from './math.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ServerMathService extends MathService {
|
||||
|
||||
protected signal: Subject<boolean>;
|
||||
|
||||
protected mathJaxOptions = {};
|
||||
|
||||
protected mathJax: MathJaxConfig = {
|
||||
source: '',
|
||||
id: '',
|
||||
};
|
||||
protected mathJaxFallback: MathJaxConfig = {
|
||||
source: '',
|
||||
id: '',
|
||||
};
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.signal = new ReplaySubject<boolean>(1);
|
||||
this.signal.next(true);
|
||||
}
|
||||
|
||||
protected async registerMathJaxAsync(config: MathJaxConfig): Promise<any> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
ready(): Observable<boolean> {
|
||||
return this.signal;
|
||||
}
|
||||
|
||||
render(element: HTMLElement) {
|
||||
return;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user