Is there something special you need to do to get AppPlatform to deliver a static angular app? I have been trying to get my production angular app to be visible with Docker and native buildpacks with no success, so i made a 1 page test angular app and failed to get that to deploy live. It doesn’t 404, It shows me a blank white page with no content, just like https://www.digitalocean.com/community/questions/i-have-an-angular-static-site-that-deployed-successfully-but-all-i-get-is-an-empty-page this guy. Using the sample-vue fork from digitalocean’s github i can get that to deploy no problem. Does someone have advice or maybe a sample-angular app i can look at? Thank you.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hi there,
When you deploy your Angular app as a static site on the App Platform, you can specify a catch-all document to redirect all requests to index.html
.
In your Static Site settings, you will have the option to choose a file (e.g. index.html
) that all inexistent paths are routed to with a 200 OK status code.
This should solve the issue that you’ve described.
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.