Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 1x 2x 2x 8x 8x | import {Component, Inject} from '@angular/core';
import {MAT_DIALOG_DATA} from "@angular/material/dialog";
import helpDatabase from './help_database.json';
@Component({
selector: 'app-help',
templateUrl: './help.component.html',
styleUrls: ['./help.component.css']
})
export class HelpComponent {
help_db: {
[content_ref: string]: {
title: string;
content: string;
}
} = helpDatabase;
constructor(@Inject(MAT_DIALOG_DATA) public content_ref: string) {
}
public getHelp(content_ref: string) {
if (content_ref in this.help_db) {
return this.help_db[content_ref]
} else E{
return {
title: "No specific help",
content: "Help not found, error code: 404 " + content_ref
}
}
}
}
|