question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

InitialNavigation enabled crashes Routing

See original GitHub issue

I’m submitting a … (check one with “x”)

[ x ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if similar feature request does not exist
[ ] support request => Suggested place for help and support is [stackoverflow](https://stackoverflow.com/), search for similar question before posting

Description

I’m not sure that this is a bug, or initialNavigation shouldn’t be enabled in the first place. If it’s not a bug, then I guess, it would be useful for somebody else with similar problem.

“Can not match any routes. URL segment: en/home”, when InitialNavigation is enabled. https://angular.io/api/router/ExtraOptions

🔬 Minimal Reproduction (if applicable)

// ./app.module.ts
// ...
RouterModule.forRoot(routes, { initialNavigation: 'enabled' })
// End of imports

🌍 Your Environment

Angular Version:


Angular CLI: 6.2.9
Node: 11.5.0
OS: darwin x64
Angular: 6.1.10
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.8.9
@angular-devkit/build-angular     0.8.9
@angular-devkit/build-optimizer   0.8.9
@angular-devkit/build-webpack     0.8.9
@angular-devkit/core              0.8.9
@angular-devkit/schematics        0.8.9
@angular/cli                      6.2.9
@ngtools/webpack                  6.2.9
@schematics/angular               0.8.9
@schematics/update                0.8.9
rxjs                              6.2.2
typescript                        2.9.2
webpack                           4.16.4

Localize Router Version:


"@angular/animations": "^6.1.0",
    "@angular/common": "^6.1.0",
    "@angular/compiler": "^6.1.0",
    "@angular/core": "^6.1.0",
    "@angular/forms": "^6.1.0",
    "@angular/http": "^6.1.0",
    "@angular/platform-browser": "^6.1.0",
    "@angular/platform-browser-dynamic": "^6.1.0",
    "@angular/router": "^6.1.0",
    "@ngx-translate/core": "^11.0.1",
    "@ngx-translate/http-loader": "^4.0.0",
    "core-js": "^2.5.4",
    "localize-router": "^2.0.0-RC.2",
    "rxjs": "~6.2.0",
    "zone.js": "~0.8.26"

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:5
  • Comments:7

github_iconTop GitHub Comments

3reactions
qubiackcommented, Apr 3, 2019

I also have this error.

2reactions
PierreLecignecommented, Mar 5, 2019

Same issue here! (Angular 7.1.0)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular Universal requires initialNavigation=enabled which ...
we create routes dynamically, opening one of those routes now fails; because the app does not wait for the APP_INITIALIZER s to load,...
Read more >
Developers - InitialNavigation enabled crashes Routing -
I'm submitting a ... (check one with "x") [ x ] bug report => Search github for a similar issue or PR before...
Read more >
Router tutorial: tour of heroes - Angular
This tutorial provides an extensive overview of the Angular router. In this tutorial, you build upon a basic router configuration to explore features...
Read more >
scullyio/community - Gitter
In my experience, this is mitigated by adding the initialNavigation: "enabled" flag to your router configuration like this: RouterModule.forRoot(routes ...
Read more >
Routing & Navigation - Angular
The Angular Router enables navigation from one view to the next as users ... the Router performs the initial navigation based on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found