title: Routing in angular2 javascript
body: <p>I can only find examples which using typescript.
  I have tried nesting ng.Router.RouteConfig with the ng.core.Component.</p>
  
  <pre><code>(function(app) {
  
  app.AppComponent = ng.core.Component({
  
      selector: "my-app",
      directives: [ng.router.RouterLink, ng.router.RouterOutlet],
      template: '&lt;h1&gt;Loading&lt;/h1&gt;'
  
  }).Class({
  
      constructor: function() {
  
      }
  }).ng.router.RouteConfig([{
      path: '/',
      redirectTo: ['/index.html'],
      path: '/home',
      component: app.HomeCmp,
      as: 'Home'
  }])
  
  })(window.app || (window.app = {}));
  </code></pre>
  
  <p>it doesn't work and i dont know how to and where to import the route related directives.</p>
  
  <p>Does any one know how to do it using javascript?</p>