title: Angular 2 Routing Behaviour based on the domain
body: <p>I am building a multi level CMS and trying to figure out a logic on the following.</p>
  
  <p>I will have one application running and have multiple domains pointing to it. It can be absolute path or relative path with the client id for example these type of domain can be pointing:</p>
  
  <ol>
  <li>www.wuhuuu.com ( Full URL pointing)</li>
  <li>www.awesomeapp.com/<strong>yaboo</strong> ( our url + /ClientID 3)</li>
  <li>bamboo.awesomeapp.com ( subdomain pointing to us)</li>
  </ol>
  
  <p><strong>How do I tell my angular app what domain is getting accessed so that I can render a specific view?</strong></p>
  
  <p>I've found out that you can pass routing from the DB via <strong>resetConfig</strong>.</p>
  
  <pre><code>router.resetConfig([
   { path: 'team/:id', component: TeamCmp, children: [
     { path: 'simple', component: SimpleCmp },
     { path: 'user/:name', component: UserCmp }
   ] }
  ]);
  </code></pre>