Report this

What is the reason for this report?

Multiple Angular apps in a single App Platform app - routing issue

Posted on April 12, 2022

I have 3 angular apps. Configured them to run all 3 in a single App Platform application as 3 components.

  • app1 has route “/” and output-dir app1
  • app2 has route “/app2” and output-dir app2
  • app3 has route “/app3” and output-dir app3

App1 is working fine on “/” path. I’ve also added the catchall document so routing on app1 is working.

The issue is that when trying to access “/app2” or “/app3” I receive an blank page (the tab title is shown correctly, but the page is empty).

After pushing to master, the build command are the following ones, so the files are placed correctly:

"build": "ng build && mv dist/app1 app1",
"build": "ng build && mv dist/app2 app2",
"build": "ng build && mv dist/app3 app3"

When trying to access “/app2” or “app3” I also receive the following errors in console.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.