MCPcopy Index your code
hub / github.com/angular/angular / getRedirectResult

Function getRedirectResult

packages/router/src/apply_redirects.ts:194–206  ·  view source on GitHub ↗
(
  redirectTo: string | RedirectFunction,
  currentSnapshot: PartialMatchRouteSnapshot,
  injector: Injector,
)

Source from the content-addressed store, hash-verified

192}
193
194function 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}

Callers 1

applyRedirectCommandsMethod · 0.85

Calls 4

firstValueFromFunction · 0.90
wrapIntoObservableFunction · 0.90
runInInjectionContextFunction · 0.90
resolveMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…