I am currently working on implementing subdomain support for UI-Router. Consider the following routes with a custom attribute 'domain':
{ name: 'mainhome', url: '/', domain: 'example.com', component: 'MainSiteComponent' },
{ name: 'bloghome', url: '/', domain: 'me.example.com',
component: 'BlogComponent' },
PLEASE NOTE: both routes share the same route URL
I am aiming to modify the href generation by the uiSref directive, taking into account the current domain AND the custom domain property.
The active route should be identified as either "mainhome" or "bloghome" depending on the current domain.
When accessing http://example.com/:
<a uiSref="mainhome">
transforms into <a href="/">
<a uiSref="bloghome">
turns into
<a href="http://me.example.com/">
Upon visiting :
<a uiSref="mainhome">
changes to
<a href="http://example.com/">
<a uiSref="bloghome">
is converted to <a href="/">
Your assistance with this matter would be greatly appreciated!