Replies: 1 comment
-
I helped someone debug an Angular app last year. Here was the final solution: #5439 (reply in thread) Maybe it'll help figure out yours? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys,
I'm using code server with angular projects that worked fine locally.
when i migrated to code server i had to change to so it would render the assets as i was getting 404's on asset files
This seemed to work fine for everything - i had to make sure all assets links where updated to and did not start with an "/assets/xxx" so "assets/xxx"
But now i have noticed an issue with dynamic routes e.g { path: 'users/top/:number' }
this works { path: 'users/top', component: TopUsersComponent },
but this does not { path: 'users/top/:number', component: TopUsersComponent },
because it cannot find / load assets e.g style-sheet or main.js / Angular bundle.
it's looking for them at the path https://mydoman.com/users/top/polyfills.js instead of https://mydoman.com/polyfills.js
which i know is directly linked to the base href being './.' that i had to modify to i could view the angular output via a
ng serve --host 0.0.0.0 --public-host mydomain.com --disable-host-check
This only happens on dynamic routes as far as i can tell
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions