Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

Conversation

odahcam
Copy link
Contributor

@odahcam odahcam commented Apr 6, 2018

Problem: I was unable to serve my static content when I published my app under a subpath route like mydomain.com/myapp/*.

Result: In this PR I created a way to dynamically get the base route of my application (stored in the BASE_HREF constant). How: I look into index.html file at runtime and do extract the <base href="X"> tag's value. Then, instead of using '*.*', I use that value to create my static content route. Now I'm able to publish my application in multiple environments (e.g. development, homolog, production) with just changing the --base-href value in build configuration time.

Got help from @andrevargas.

I was unable to serve my static content when I published my app under a subpath route like `mydomain.com/myapp/*`.

Got help from @andrevargas.
@odahcam odahcam changed the title feat(server): static content ng's BASE_HREF based Serving static content based on Angular's BASE_HREF Apr 6, 2018
@odahcam
Copy link
Contributor Author

odahcam commented Aug 30, 2018

PR description updated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant