title: Angular 5 role based routing
body: <p>I've a website with a home page defined in my routing module as:</p>
  
  <pre><code>const appRoutes: Routes = [
  {
    path: '',
    component: HomeComponent
  }];
  </code></pre>
  
  <p>Now I would like to display a different home page for admin users (a Dashboard page).
  Could I change the "component" called based on the user's role?</p>
  
  <p>in pseudo code something like:</p>
  
  <pre><code>const appRoutes: Routes = [
  {
    path: '',
    IF UserRole = 'Admin'
       component: DashboardComponent
    ELSE
       component: HomeComponent
  }];
  </code></pre>