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