(nodes: TreeNode<ActivatedRouteSnapshot>[])
| 584 | } |
| 585 | |
| 586 | function checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]): void { |
| 587 | const names: {[k: string]: ActivatedRouteSnapshot} = {}; |
| 588 | nodes.forEach((n) => { |
| 589 | const routeWithSameOutletName = names[n.value.outlet]; |
| 590 | if (routeWithSameOutletName) { |
| 591 | const p = routeWithSameOutletName.url.map((s) => s.toString()).join('/'); |
| 592 | const c = n.value.url.map((s) => s.toString()).join('/'); |
| 593 | throw new RuntimeError( |
| 594 | RuntimeErrorCode.TWO_SEGMENTS_WITH_SAME_OUTLET, |
| 595 | (typeof ngDevMode === 'undefined' || ngDevMode) && |
| 596 | `Two segments cannot have the same outlet name: '${p}' and '${c}'.`, |
| 597 | ); |
| 598 | } |
| 599 | names[n.value.outlet] = n.value; |
| 600 | }); |
| 601 | } |
| 602 | |
| 603 | function getData(route: Route): Data { |
| 604 | return route.data || {}; |
no test coverage detected
searching dependent graphs…