mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
687 B
26 lines
687 B
/*
|
|
* Squidex Headless CMS
|
|
*
|
|
* @license
|
|
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
|
|
*/
|
|
|
|
import { HttpClient } from '@angular/common/http';
|
|
import { Injectable } from '@angular/core';
|
|
import { Observable, of } from 'rxjs';
|
|
import { catchError } from 'rxjs/operators';
|
|
|
|
@Injectable()
|
|
export class HelpService {
|
|
constructor(
|
|
private readonly http: HttpClient
|
|
) {
|
|
}
|
|
|
|
public getHelp(helpPage: string): Observable<string> {
|
|
const url = `https://raw.githubusercontent.com/squidex/squidex-docs2/master/${helpPage}.md`;
|
|
|
|
return this.http.get(url, { responseType: 'text' }).pipe(
|
|
catchError(() => of('')));
|
|
}
|
|
}
|