* @deprecated 21.1 - Use the `isActive` function instead. * @see isActive
(url: string | UrlTree, matchOptions: boolean | Partial<IsActiveMatchOptions>)
| 637 | * @see {@link isActive} |
| 638 | */ |
| 639 | isActive(url: string | UrlTree, matchOptions: boolean | Partial<IsActiveMatchOptions>): boolean { |
| 640 | let options: IsActiveMatchOptions; |
| 641 | if (matchOptions === true) { |
| 642 | options = {...exactMatchOptions}; |
| 643 | } else if (matchOptions === false) { |
| 644 | options = {...subsetMatchOptions}; |
| 645 | } else { |
| 646 | options = {...subsetMatchOptions, ...matchOptions}; |
| 647 | } |
| 648 | if (isUrlTree(url)) { |
| 649 | return containsTree(this.currentUrlTree, url, options); |
| 650 | } |
| 651 | |
| 652 | const urlTree = this.parseUrl(url); |
| 653 | return containsTree(this.currentUrlTree, urlTree, options); |
| 654 | } |
| 655 | |
| 656 | private removeEmptyProps(params: Params): Params { |
| 657 | return Object.entries(params).reduce((result: Params, [key, value]: [string, any]) => { |
nothing calls this directly
no test coverage detected