(
futureNode: TreeNode<ActivatedRouteSnapshot>,
currNode: TreeNode<ActivatedRouteSnapshot> | null,
contexts: ChildrenOutletContexts | null,
futurePath: ActivatedRouteSnapshot[],
checks: Checks = {
canDeactivateChecks: [],
canActivateChecks: [],
},
)
| 82 | } |
| 83 | |
| 84 | function getChildRouteGuards( |
| 85 | futureNode: TreeNode<ActivatedRouteSnapshot>, |
| 86 | currNode: TreeNode<ActivatedRouteSnapshot> | null, |
| 87 | contexts: ChildrenOutletContexts | null, |
| 88 | futurePath: ActivatedRouteSnapshot[], |
| 89 | checks: Checks = { |
| 90 | canDeactivateChecks: [], |
| 91 | canActivateChecks: [], |
| 92 | }, |
| 93 | ): Checks { |
| 94 | const prevChildren = nodeChildrenAsMap(currNode); |
| 95 | |
| 96 | // Process the children of the future route |
| 97 | futureNode.children.forEach((c) => { |
| 98 | getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks); |
| 99 | delete prevChildren[c.value.outlet]; |
| 100 | }); |
| 101 | |
| 102 | // Process any children left from the current route (not active for the future route) |
| 103 | Object.entries(prevChildren).forEach(([k, v]: [string, TreeNode<ActivatedRouteSnapshot>]) => |
| 104 | deactivateRouteAndItsChildren(v, contexts!.getContext(k), checks), |
| 105 | ); |
| 106 | |
| 107 | return checks; |
| 108 | } |
| 109 | |
| 110 | function getRouteGuards( |
| 111 | futureNode: TreeNode<ActivatedRouteSnapshot>, |
no test coverage detected
searching dependent graphs…