-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed as duplicate of#31064
Closed as duplicate of#31064
@divdavem
Please provide the environment you discovered this bug in (run
Description
Which @angular/* package(s) are the source of the bug?
Don't known / other
Is this a regression?
No
Description
Hello,
I am opening this issue because when using redirectTo
in the children
of a route, when SSG is enabled, Angular generates a blank page for index.html
:
// app.routes.ts export const routes: Routes = [ { path: '', component: LayoutComponent, children: [ { path: '', pathMatch: 'full', redirectTo: 'overview', }, { path: 'overview', component: OverviewComponent, }, ], }, ];
I was expecting the redirect to produce a <meta http-equiv="refresh">
soft redirect as explained in the documentation.
Steps to reproduce the issue easily:
git clone https://github.com/divdavem/angular-router-bug-ssg-redirect
cd angular-router-bug-ssg-redirect
npm ci
npm run build
Notice that dist/myapp/browser/index.html
is empty.
Please provide a link to a minimal reproduction of the bug
https://github.com/divdavem/angular-router-bug-ssg-redirect
Please provide the exception or error you saw
A blank html page is generated instead of the expected `<meta http-equiv="refresh">` soft redirect.
Please provide the environment you discovered this bug in (run ng version
)
Angular CLI: 20.2.2
Node: 24.7.0
Package Manager: npm 11.5.1
OS: linux x64
Angular: 20.2.4
... common, compiler, compiler-cli, core, forms
... platform-browser, platform-server, router
Package Version
------------------------------------
@angular-devkit/architect 0.2002.2
@angular-devkit/core 20.2.2
@angular-devkit/schematics 20.2.2
@angular/build 20.2.2
@angular/cli 20.2.2
@angular/ssr 20.2.2
@schematics/angular 20.2.2
rxjs 7.8.2
typescript 5.9.2
Anything else?
No response
Metadata
Metadata
Assignees
Labels
No labels