title: How to list / output all routes in @Routes in my Angular2 App
body: <p>I have a quick question. I'm currently looking through <a href="https://angular.io/docs/ts/latest/api/router/Router-class.html">https://angular.io/docs/ts/latest/api/router/Router-class.html</a> but I was wondering, in my Angular2's <code>main.ts</code> I have my routes defined thus: </p>
  
  <pre><code>@Routes([
      { path: '/', component: HomeComponent },
      { path: '/about-me', component: AboutMeComponent },
      { path: '/food', component: FoodComponent },
      { path: '/photos', component: PhotosComponent },
      { path: '/technology', component: TechnologyComponent },
      { path: '/blog', component:Blogomponent },
  ])
  </code></pre>
  
  <p>Now in a component elsewhere I import the Router class. In my component (or the component template) I would like to loop through all my routes defined or just be able to access them. Is there a built in way to do this? Like some function that returns an object array? Here is a crude idea of what I want...</p>
  
  <pre><code>@Component({
      selector: 'ms-navigation',
      templateUrl: 'src/navigation/navigation.template.html',
      directives: [ ROUTER_DIRECTIVES ]
  })
  
  export class NavigationComponent {
      constructor(private router:Router) {   
          // what can I do here to get an array of all my routes?
          console.log(router.routes); ????
      }
  }
  </code></pre>