I'm researching the possibility of having the username set as a "subdomain" in Angular 2. From the research I've done so far it seems that for example a system hosted on IIS all that would be needed is URL rewriting to convert example www.mywebsite.com/username
or www.mywebsite.com?user=username
to www.username.mywebsite.com
. (References: IIS URL Rewrite, Example Setup)
I might be wrong, but my thinking is that setting this up in IIS for an Angular 2 application wouldn't make a difference as when accessing routes the server is not being accessed - routing is handled by Angular itself.
So on to my question: Is there a way that this could be handled in an Angular 2 application?