-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: routerfreq1: lowrouter: config matching/activation/validationstate: confirmedtype: bug/fix
Milestone
Description
🐞 bug report
Affected Package
The issue is caused by package @angular/router
Is this a regression?
Unsure.
Description
I have a named router outlet which I want to default by redirecting the empty path to one of the named paths, e.g.
{ outlet: 'test', path: '', pathMatch: 'full', redirectTo: 'default' },
{ outlet: 'test', path: 'default', component: TestComponent },
This worked when the configuration was in a lazy loaded module, however moving it to the root router configuration now fails to validate. This configuration seems like it should be valid. The only workaround I could find was to use an absolute path, e.g.
{ path: 'test', pathMatch: 'full', redirectTo: '/test/(test:default)' },
🔬 Minimal Reproduction
https://stackblitz.com/edit/angular-issue-repro2-fikqg2
🔥 Exception or Error
Error: Invalid configuration of route 'test/': a componentless route without children or loadChildren cannot have a named outlet set
🌍 Your Environment
Angular Version:
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 8.3.17
Node: 12.4.0
OS: darwin x64
Angular: 8.2.13
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect
@angular-devkit/build-angular 0.802.2
@angular-devkit/core
@angular-devkit/schematics
@angular/cdk 7.3.7
@angular/cli 8.3.17
@angular/material 7.3.7
@schematics/angular
@schematics/update
rxjs 6.5.3
typescript 3.5.3
webpack 4.38.0
Anything else relevant?
Nope.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: routerfreq1: lowrouter: config matching/activation/validationstate: confirmedtype: bug/fix