Angular multiple apps dist folder doesn’t load the index file on local server

  angular, angular-routing, architecture

I have one main app and several product apps that I want to serve using single url.

I have put the distribution of main app in the root of public folder of local http-server. Within the public folder, I’ve created products/app2 and products/app3 and placed the distribution of app2 and app3 respectively.

          /* build of app2 */
          /* build of app3 */
     /* build of main app */

When I hit the url

the content of main app loads. However, when I hit

the index.html of app2 does not load and it redirects to main app.

I tried putting simple index.html file directly at root of products folder and it works fine.

Why Angular distribution build placed in the above structure fails to load and how should I be routing to
product builds.

Source: Angular Questions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.