Fix anchor links on new ng faq template

This commit is contained in:
hunicus 2022-06-13 21:03:17 -04:00
parent e24efe7528
commit 0031fbf886
No known key found for this signature in database
GPG Key ID: 24837C51B6D81FD9

View File

@ -36,6 +36,7 @@ export class ApiDocsComponent implements OnInit, AfterViewInit {
ngAfterViewInit() {
const that = this;
this.faqTemplates.forEach((x) => this.dict[x.type] = x.template);
setTimeout( () => {
if( this.route.snapshot.fragment ) {
this.openEndpointContainer( this.route.snapshot.fragment );
@ -44,7 +45,6 @@ export class ApiDocsComponent implements OnInit, AfterViewInit {
window.addEventListener('scroll', function() {
that.desktopDocsNavPosition = ( window.pageYOffset > 182 ) ? "fixed" : "relative";
}, { passive: true} );
this.faqTemplates.forEach((x) => this.dict[x.type] = x.template);
}, 1 );
}