()
| 567 | } |
| 568 | |
| 569 | private createUrlTree(): UrlTree | null { |
| 570 | const routerLinkInput = this.routerLinkInput(); |
| 571 | if (routerLinkInput === null || !this.router.createUrlTree) { |
| 572 | return null; |
| 573 | } else if (isUrlTree(routerLinkInput)) { |
| 574 | return routerLinkInput; |
| 575 | } |
| 576 | return this.router.createUrlTree(routerLinkInput, { |
| 577 | // If the `relativeTo` input is not defined, we want to use `this.route` |
| 578 | // by default. |
| 579 | // Otherwise, we should use the value provided by the user in the input. |
| 580 | relativeTo: this._relativeTo() !== undefined ? this._relativeTo() : this.route, |
| 581 | queryParams: this._queryParams(), |
| 582 | fragment: this._fragment(), |
| 583 | queryParamsHandling: this._queryParamsHandling(), |
| 584 | preserveFragment: this._preserveFragment(), |
| 585 | }); |
| 586 | } |
| 587 | |
| 588 | get urlTree(): UrlTree | null { |
| 589 | return untracked(() => this.createUrlTree()); |
no test coverage detected