File tree 2 files changed +7
-4
lines changed
apps/daffio/src/app/docs/components/docs-list
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 5
5
</ ng-template >
6
6
7
7
< ng-template #daffTreeItemTpl let-node >
8
- < a [daffTreeItem] ="activeRouterLinkConfiguration " [node] ="node " [routerLink] ="node.url "> {{ node.title }}</ a >
8
+ < a [daffTreeItem] ="ROUTER_LINK_ACTIVE_CONFIG " [node] ="node " [routerLink] ="node.url "> {{ node.title }}</ a >
9
9
</ ng-template >
10
10
</ ul >
11
11
}
Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ import {
25
25
26
26
import { DaffioDocList } from '../../models/doc-list' ;
27
27
28
+ const DEFAULT_ROUTER_LINK_ACTIVE_CONFIG : RouterLinkActive [ 'routerLinkActiveOptions' ] = {
29
+ exact : true ,
30
+ } ;
31
+
28
32
const visit = ( guide : DaffioDocList ) : DaffTreeData < unknown > => ( {
29
33
id : guide . id ,
30
34
title : guide . title ,
@@ -47,6 +51,8 @@ const visit = (guide: DaffioDocList): DaffTreeData<unknown> => ({
47
51
export class DaffioDocsListComponent implements OnInit {
48
52
private _list$ = new BehaviorSubject < DaffioDocList > ( null ) ;
49
53
54
+ readonly ROUTER_LINK_ACTIVE_CONFIG = DEFAULT_ROUTER_LINK_ACTIVE_CONFIG ;
55
+
50
56
/**
51
57
* The guide list to render
52
58
*/
@@ -56,9 +62,6 @@ export class DaffioDocsListComponent implements OnInit {
56
62
}
57
63
58
64
tree$ : Observable < DaffTreeData < unknown > > ;
59
- readonly activeRouterLinkConfiguration : RouterLinkActive [ 'routerLinkActiveOptions' ] = {
60
- exact : true ,
61
- } ;
62
65
63
66
ngOnInit ( ) : void {
64
67
this . tree$ = this . _list$ . pipe (
You can’t perform that action at this time.
0 commit comments