diff --git a/src/lib/help-mode/help-mode.service.ts b/src/lib/help-mode/help-mode.service.ts index f81f169..275e62f 100644 --- a/src/lib/help-mode/help-mode.service.ts +++ b/src/lib/help-mode/help-mode.service.ts @@ -3,7 +3,7 @@ import { MatDialog, MatDialogRef } from '@angular/material/dialog'; import { TranslateService } from '@ngx-translate/core'; import { BehaviorSubject, firstValueFrom } from 'rxjs'; import { HelpModeDialogComponent } from './help-mode-dialog/help-mode-dialog.component'; -import { HELP_DOCS } from './tokens'; +import { HELP_DOCS, MANUAL_BASE_URL } from './tokens'; interface Helper { readonly element: HTMLElement; @@ -25,6 +25,7 @@ export class HelpModeService { constructor( @Inject(HELP_DOCS) private readonly _docs: Record>, + @Inject(MANUAL_BASE_URL) private readonly _manualBaseURL: string, private readonly _dialog: MatDialog, private readonly _rendererFactory: RendererFactory2, private readonly _translateService: TranslateService, @@ -55,7 +56,7 @@ export class HelpModeService { openDocsFor(elementName: string): void { if (this.isHelpModeActive) { - window.open(this._docs[elementName][this._translateService.currentLang]); + window.open(`${this._manualBaseURL}${this._docs[elementName][this._translateService.currentLang]}`); } } diff --git a/src/lib/help-mode/tokens.ts b/src/lib/help-mode/tokens.ts index 3bb8bd9..c8f5a26 100644 --- a/src/lib/help-mode/tokens.ts +++ b/src/lib/help-mode/tokens.ts @@ -1,3 +1,4 @@ import { InjectionToken } from '@angular/core'; export const HELP_DOCS = new InjectionToken>>('Links to user manual or help docs'); +export const MANUAL_BASE_URL = new InjectionToken>>('Base manual URL');