Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng serve fails to load app if url parameter contains a dot (.) #27657

Closed
1 task done
MurmursDev opened this issue May 18, 2024 · 7 comments
Closed
1 task done

ng serve fails to load app if url parameter contains a dot (.) #27657

MurmursDev opened this issue May 18, 2024 · 7 comments

Comments

@MurmursDev
Copy link

Command

serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

same to this issue #26320

Now the Vite 5 is already out but this problem is still here.

Minimal Reproduction

ng new test

cd test

ng generate component test

change app.routes.ts

import { Routes } from '@angular/router';
import {TestComponent} from "./test/test.component";

export const routes: Routes = [
{
    path: 'welcome.html', component: TestComponent
 }
];

visit http://localhost:4200/welcome.html and got Cannot GET /options.html

Exception or Error

No response

Your Environment

Angular CLI: 17.3.7
Node: 18.20.2
Package Manager: npm 10.5.0
OS: darwin arm64

Angular: 17.3.9
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1703.7
@angular-devkit/build-angular   17.3.7
@angular-devkit/core            17.3.7
@angular-devkit/schematics      17.3.7
@angular/cli                    17.3.7
@schematics/angular             17.3.7
rxjs                            7.8.1
typescript                      5.2.2
zone.js                         0.14.6

Anything else relevant?

No response

@MurmursDev
Copy link
Author

"@angular-devkit/build-angular": "17.1.0", works

@MurmursDev
Copy link
Author

17.1.1 works
17.1.2+ doesn't work

@MurmursDev
Copy link
Author

Is this the problem? 3deb0d4a1 fix return 404 for assets that are not found

17.1.2 (2024-01-31)

@angular-devkit/build-angular

Commit Type Description
6815f13e3 fix add required modules as externals imports
a0e306098 fix correctly handle glob negation in proxy config when using vite
235c8403a fix handle regular expressions in proxy config when using Vite
5332e5b2e fix resolve absolute output-path when using esbuild based builders
3deb0d4a1 fix return 404 for assets that are not found

@alan-agius4
Copy link
Collaborator

Why do you include file extensions in your SPA routes? Including file extensions in routes is often due to legacy systems or a desire for clarity. However, this practice isn't ideal for SPAs as modern best practices favor clean, extensionless URLs. They enhance user experience, aid SEO, and ensure consistency across routes.

@alan-agius4 alan-agius4 removed type: bug/fix freq1: low Only reported by a handful of users who observe it rarely severity5: regression labels May 21, 2024
@MurmursDev
Copy link
Author

MurmursDev commented May 21, 2024 via email

@alan-agius4
Copy link
Collaborator

Why do you need two HTML files? The Chrome Extension can be a SPA where routing is managed by the Angular router.

@MurmursDev
Copy link
Author

MurmursDev commented May 25, 2024 via email

@alan-agius4 alan-agius4 closed this as not planned Won't fix, can't repro, duplicate, stale May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants