Question

Static Angular with AppPlatform

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.


Submit an answer


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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
February 24, 2024
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

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more