title: Deny access to routes in Angular js 2
body: <p>I have a file with the routes and wanted to deny access to some when the user does not have the login done ,how can i do this?</p>
  
  <p>my routes</p>
  
  <pre><code>import { provideRouter, RouterConfig }  from '@angular/router';
  import {SymfonyComponent} from './symfony.component';
  import {Symfony2Component} from './symfony2.component';
  import {Symfony3Component} from './symfony3.component';
  import {LoginComponent} from './login.component';
  
  const routes: RouterConfig = [
    {
      path: 'all',
      component: SymfonyComponent
    },
  
    {
      path: 'one',
      component: Symfony2Component
    },
     {
      path: 'post',
      component: Symfony3Component
    },
    {
      path: 'login',
      component: LoginComponent
    },
  ];
  
  export const appRouterProviders = [
    provideRouter(routes)
  ];
  </code></pre>