Generalize api-docs components to accommodate faq

Also add chunk of faq content.
This commit is contained in:
hunicus
2022-03-26 09:09:37 -04:00
parent 289ed7b9b3
commit ef2c845714
7 changed files with 225 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { restApiDocsData } from './api-docs-data';
import { faqData } from './api-docs-data';
@Component({
selector: 'app-api-docs-nav',
@@ -9,13 +10,18 @@ import { restApiDocsData } from './api-docs-data';
export class ApiDocsNavComponent implements OnInit {
@Input() network: any;
@Input() whichTab: string;
@Output() navLinkClickEvent: EventEmitter<any> = new EventEmitter();
restDocs: any[];
tabData: any[];
constructor() { }
ngOnInit(): void {
this.restDocs = restApiDocsData;
if( this.whichTab === 'rest' ) {
this.tabData = restApiDocsData;
} else if( this.whichTab = 'faq' ) {
this.tabData = faqData;
}
}
navLinkClick( event ) {