Fix anchor links when navigating to current anchor

This commit is contained in:
hunicus
2022-03-11 19:06:06 -05:00
parent 2d4b824862
commit b71df774f5
4 changed files with 19 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
import { Component, OnInit, Input } from '@angular/core';
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { restApiDocsData } from './api-docs-data';
@Component({
@@ -9,7 +9,7 @@ import { restApiDocsData } from './api-docs-data';
export class ApiDocsNavComponent implements OnInit {
@Input() network: any;
@Input() collapseItem: any = { toggle: () => {} };
@Output() navLinkClickEvent: EventEmitter<any> = new EventEmitter();
restDocs: any[];
constructor() { }
@@ -17,5 +17,9 @@ export class ApiDocsNavComponent implements OnInit {
ngOnInit(): void {
this.restDocs = restApiDocsData;
}
navLinkClick( event ) {
this.navLinkClickEvent.emit( event );
}
}