Reputation: 2851
I have a Angular 2 app that has a login component that I want to have a subdomain of login.mydomain.com
, and then an admin dashboard component which I want to be portal.mydomain.com
. How do I make this happen using the Angular 2 Router? or is there a different approach I should take?
Oh and I am using the Angular-cli
and I know about the ng build --base-href
command.
Upvotes: 2
Views: 2198
Reputation: 1304
You don't need any configuration here. Those two sub domains are different apps. Use routes instead, like example.com/#/login & /#/portial.
But if you are going to have two different app. Just Upload your files in folder of your sub domains.
Angular has nothing to do with your sub domains.
But if you are going to do something like this for different apps example.com/login & example/partial (without sub domains).
Then you need to set base href in your angular.json configuration
Upvotes: 1