( redirectTo: string | RedirectFunction, currentSnapshot: PartialMatchRouteSnapshot, injector: Injector, )
| 172 | } |
| 173 | |
| 174 | function getRedirectResult( |
| 175 | redirectTo: string | RedirectFunction, |
| 176 | currentSnapshot: PartialMatchRouteSnapshot, |
| 177 | injector: Injector, |
| 178 | ): Promise<string | UrlTree> { |
| 179 | if (typeof redirectTo === 'string') { |
| 180 | return Promise.resolve(redirectTo); |
| 181 | } |
| 182 | const redirectToFn = redirectTo; |
| 183 | return firstValueFrom( |
| 184 | wrapIntoObservable(runInInjectionContext(injector, () => redirectToFn(currentSnapshot))), |
| 185 | ); |
| 186 | } |
no test coverage detected