🐞 bug report
Affected Package
The issue is caused by package @angular/common/upgrade
Is this a regression?
No, the feature on which this was built was introduced in Angular 8
Description
When useHash is set to true using the newly introduced LocationUpgradeModule, Angular routing fails to initialise. This appears to be caused by the private $$parse method in location_shim.ts, which is being called with urls containing an unexpected # prefix (the current code only checks for a / prefix
🔬 Minimal Reproduction
https://angular-issue-repro2-3bkm6g.stackblitz.io
🔥 Exception or Error
The initial console error is:
Unhandled Navigation Error:
Using the debugger to drill down into the code to reveal the actual error:
Invalid url "#/", missing path prefix "https://angular-issue-repro2-3bkm6g.stackblitz.io/".
🌍 Your Environment
Angular Version:
Angular CLI: 8.1.2
Node: 10.15.0
OS: darwin x64
Angular: 8.1.3
... common, compiler, compiler-cli, core, language-service
... platform-browser, platform-browser-dynamic, router, upgrade
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.801.2
@angular-devkit/build-angular 0.801.2
@angular-devkit/build-optimizer 0.801.2
@angular-devkit/build-webpack 0.801.2
@angular-devkit/core 8.1.2
@angular-devkit/schematics 8.1.2
@angular/cli 8.1.2
@ngtools/webpack 8.1.2
@schematics/angular 8.1.2
@schematics/update 0.801.2
rxjs 6.4.0
typescript 3.4.5
webpack 4.35.2
Anything else relevant?
🐞 bug report
Affected Package
The issue is caused by package @angular/common/upgradeIs this a regression?
No, the feature on which this was built was introduced in Angular 8Description
When
useHashis set totrueusing the newly introducedLocationUpgradeModule, Angular routing fails to initialise. This appears to be caused by the private$$parsemethod inlocation_shim.ts, which is being called with urls containing an unexpected#prefix (the current code only checks for a/prefix🔬 Minimal Reproduction
https://angular-issue-repro2-3bkm6g.stackblitz.io
🔥 Exception or Error
The initial console error is:
Using the debugger to drill down into the code to reveal the actual error:
🌍 Your Environment
Angular Version:
Anything else relevant?