Harleen Kaur Arora
Harleen Kaur Arora

Reputation: 2087

How to load multiple apps in one domain in angular2?

I am trying to load two apps in one domain based on own roles. There are two methods for implementing this:-

  1. Create a project and create children's module of app module by the asynchronous-routing method.
  2. Create a project and create different two apps like first is the app and second is app1 and load by role based.

I am using angular-CLI of my project. In my project 500+ components. So which one is better and How to implement it?

Upvotes: 4

Views: 2009

Answers (1)

Mike
Mike

Reputation: 607

Run each app on it's own site.

http://localhost:4000/
http://localhost:4001/

Then use a gateway server to redirect based on part of the url:

http://localhost:80/admin ====> site1
http://localhost:80/public ====> site2

Upvotes: 1

Related Questions