angular / angular

Deliver web apps with confidence 🚀
https://angular.dev
MIT License
96.08k stars 25.42k forks source link

Angular local application, Error: Cannot match any routes. URL Segment: 'x86' #24311

Closed StefanRiedmann closed 6 years ago

StefanRiedmann commented 6 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:

Current behavior

Using Angular in an (offline) Extension for Adobe Illustrator. On Windows, these are installed under C:\Program Files (x86)\Common Files\Adobe\CEP\extensions

On startup, I get this error ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'x86'

Apparently, the (x86) part of the url (filepath) is generating issues in parsing the url segments. I already tried solving this with different values for 'base href...'.

The problem is that I can't use 'base href="/"', because that just leads to this error on load: Failed to load resource: net::ERR_FILE_NOT_FOUND

Expected behavior

The url segment loading/parsing should be able to handle this local filepath containing '... x86 ...'.

Minimal reproduction of the problem with instructions

I couldn't reproduce it yet with a minimal Angular application inside a path containing x86. I'm working on it still.

What is the motivation / use case for changing the behavior?

Make routing work in local Angular applications

Environment


Angular version: 6.0.3

Browser:
- [x] Chromium version 57.0.2987.74 (integrated in Adobe)
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:
- Node version: 8.11.2
- Platform:  Windows

Others:
---
StefanRiedmann commented 6 years ago

Changing base href in index.html to this value solved the issue:

<script>document.write('<base href="' + document.location + '" />');</script>

angular-automatic-lock-bot[bot] commented 5 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.