@paperbits/core
Version:
Paperbits core components.
27 lines (22 loc) • 814 B
text/typescript
import * as ko from "knockout";
import template from "./helpCenter.html";
import { Component, OnMounted, Param } from "@paperbits/common/ko/decorators";
import { HelpService } from "@paperbits/common/tutorials/helpService";
({
selector: "help-center",
template: template
})
export class HelpCenter {
public readonly helpContent: ko.Observable<string>;
constructor(private readonly helpService: HelpService) {
this.articleKey = ko.observable();
this.helpContent = ko.observable();
}
()
public articleKey: ko.Observable<string>;
()
public async initialize(): Promise<void> {
const helpContent = await this.helpService.getHelpContent(this.articleKey());
this.helpContent(helpContent);
}
}