( redirectTo: string | RedirectFunction, currentSnapshot: PartialMatchRouteSnapshot, injector: Injector, )
| 192 | } |
| 193 | |
| 194 | function getRedirectResult( |
| 195 | redirectTo: string | RedirectFunction, |
| 196 | currentSnapshot: PartialMatchRouteSnapshot, |
| 197 | injector: Injector, |
| 198 | ): Promise<string | UrlTree> { |
| 199 | if (typeof redirectTo === 'string') { |
| 200 | return Promise.resolve(redirectTo); |
| 201 | } |
| 202 | const redirectToFn = redirectTo; |
| 203 | return firstValueFrom( |
| 204 | wrapIntoObservable(runInInjectionContext(injector, () => redirectToFn(currentSnapshot))), |
| 205 | ); |
| 206 | } |
no test coverage detected
searching dependent graphs…