Skip to content

Angular 21 compatibility #174

@mike-mima

Description

@mike-mima

Hello,

it seems, that the extensions doesn't work with Angular 21 anymore. Especially the loadChildren() seems problematic.

Here is a minimal routing example:

// de.json
{
  "ROUTES.my-home": "home",
  "ROUTES.my-login": "login",
 "ROUTES.my-subcomponent": "subcomponent"
}

//app.routes.ts
export const routes: Routes = [
  {
    path: 'my-home',
    loadChildren: () => import('./home/home.routes')
  },
{
   path: 'my-login',
   component: Login
}
];

//home.routes.ts
const homeRoutes: Routes = [
  {
    path: '',
    component: Home,
    children: [
      {
        path: 'my-subcomponent',
        component: Subcomponent,
      },
    ]
  }
];

Trying to open the url /de/home/subcomponent throws an error in the console:

main.ts:5 ERROR TypeError: Cannot read properties of undefined (reading 'some')
    at containsEmptyPathMatches (_router-chunk.mjs:2744:17)
    at split (_router-chunk.mjs:2703:38)
    at Recognizer.<anonymous> (_router-chunk.mjs:2942:9)
    at Generator.next (<anonymous>)
    at fulfilled (chunk-CNSXMD5J.js?v=e0031a75:36:24)

Trying to open the url /de/login does work.

With Angular v20 everything works as expected

Cheers,

Mike

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions