diff --git a/packages/router/src/apply_redirects.ts b/packages/router/src/apply_redirects.ts index 391688a6ff..2cc993e10d 100644 --- a/packages/router/src/apply_redirects.ts +++ b/packages/router/src/apply_redirects.ts @@ -95,7 +95,8 @@ class ApplyRedirects { })); return urlTrees$.pipe(catchError((e: any) => { if (e instanceof AbsoluteRedirect) { - // after an absolute redirect we do not apply any more redirects! + // After an absolute redirect we do not apply any more redirects! + // If this implementation changes, update the documentation note in `redirectTo`. this.allowRedirects = false; // we need to run matching, so we can fetch all lazy-loaded modules return this.match(e.urlTree); diff --git a/packages/router/src/config.ts b/packages/router/src/config.ts index e1278e0fe0..0955c00e26 100644 --- a/packages/router/src/config.ts +++ b/packages/router/src/config.ts @@ -422,7 +422,10 @@ export interface Route { component?: Type; /** * A URL to redirect to when the path matches. + * * Absolute if the URL begins with a slash (/), otherwise relative to the path URL. + * Note that no further redirects are evaluated after an absolute redirect. + * * When not present, router does not redirect. */ redirectTo?: string;