mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-20 09:20:12 +01:00
fix(docs): async md load
This commit is contained in:
parent
e77829a465
commit
0026c02fdf
7 changed files with 73 additions and 33 deletions
|
|
@ -13,7 +13,7 @@ import {
|
|||
} from '@angular/core';
|
||||
import { takeWhile, map } from 'rxjs/operators';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { of as observableOf, combineLatest } from 'rxjs';
|
||||
import { combineLatest, Observable } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-page-toc',
|
||||
|
|
@ -35,11 +35,11 @@ export class NgxPageTocComponent implements OnDestroy {
|
|||
items: any[];
|
||||
|
||||
@Input()
|
||||
set toc(value) {
|
||||
combineLatest(
|
||||
observableOf(value || []),
|
||||
set toc(value: Observable<any[]>) {
|
||||
combineLatest([
|
||||
value,
|
||||
this.activatedRoute.fragment,
|
||||
)
|
||||
])
|
||||
.pipe(
|
||||
takeWhile(() => this.alive),
|
||||
map(([toc, fragment]) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue