This repository was archived by the owner on May 25, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -22,14 +22,14 @@ export function parseRoutes(router: any): Route {
22
22
isAux : false ,
23
23
specificity : null ,
24
24
data : null ,
25
- hash : null ,
25
+ hash : null
26
26
} ;
27
27
28
28
return root ;
29
29
}
30
30
31
31
function assignChildrenToParent ( parentPath , children ) : [ any ] {
32
- return children . map ( ( child ) => {
32
+ return children . map ( child => {
33
33
const childName = childRouteName ( child ) ;
34
34
const childDescendents : [ any ] = child . _loadedConfig ? child . _loadedConfig . routes : child . children ;
35
35
@@ -46,7 +46,7 @@ function assignChildrenToParent(parentPath, children): [any] {
46
46
name : childName ,
47
47
path : `${ parentPath ? parentPath : '' } /${ pathFragment } ` . split ( '//' ) . join ( '/' ) ,
48
48
isAux : isAuxRoute ,
49
- children : [ ] ,
49
+ children : [ ]
50
50
} ;
51
51
52
52
if ( childDescendents ) {
@@ -58,7 +58,7 @@ function assignChildrenToParent(parentPath, children): [any] {
58
58
if ( child . data . hasOwnProperty ( el ) ) {
59
59
routeConfig . data . push ( {
60
60
key : el ,
61
- value : child . data [ el ] ,
61
+ value : child . data [ el ]
62
62
} ) ;
63
63
}
64
64
}
@@ -71,11 +71,11 @@ function assignChildrenToParent(parentPath, children): [any] {
71
71
function childRouteName ( child ) : string {
72
72
if ( child . component ) {
73
73
return child . component . name ;
74
- }
75
- else if ( child . loadChildren ) {
74
+ } else if ( child . loadChildren ) {
76
75
return `${ child . path } [Lazy]` ;
77
- }
78
- else {
76
+ } else if ( child . redirectTo ) {
77
+ return `${ child . path } -> redirecting to -> "${ child . redirectTo } "` ;
78
+ } else {
79
79
return 'no-name-route' ;
80
80
}
81
81
}
You can’t perform that action at this time.
0 commit comments