But very weird, when I refresh the page I get this error message:
In your repo, add a file named netlify.toml
with the following:
[[redirects]]
from = "/*"
status = 200
to = "/index.html"
This is the right Answer and fixes the problem. It seems like the Angular Runtime works especially with Angular Universal, which creates a browser
directory on build.
The error on the part of Netlify is that the Angular Runtime is automatically activated for SPAs. Here, either the runtime should be adapted so that it works with SPAs and no longer requires the browser directory and, if necessary, directly creates the required redirect rule. Or the runtime should not be activated for SPAs in the first place. The current status is that you cannot deploy Angular SPAs to Netlify without errors and you have to spend a lot of time finding the error.
I would be delighted if a solution could be found quickly. Unfortunately, there is also very little response to the feedback in the Github issues of the Angular Runtime Repo.
I also faced this weird error while deploying my Angular ssr v17 app, so how i resolved this was just giving the same name publish = “dist/angular-v17-ssr/browser” in netlify.toml file and “outputPath”: “dist/angular-v17-ssr” in angular.json build options , note that the name angular-v17-ssr is different from repo name angular-v17-SSR-demo, so once after clearing cache a successful deploy, u can even change it back to ur repo name, its a weird error and not even disabling angular runtime helped me, try this out and let me know