title: Angular 2 routerLink doesn't work
body: <p>I can't click on the <code>&lt;a routerLink="/login"&gt;Login&lt;/a&gt;</code> to navigate from the home page to the login page. I have already read the tutorial and the developer guide on the website of Angular 2.</p>
  
  <p>This is what I have in my code:</p>
  
  <p>index.html:</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;base href="/"&gt;
          &lt;title&gt;Portfolio&lt;/title&gt;
          &lt;meta charset="UTF-8"&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
          &lt;script src="bower_components/jquery/dist/jquery.min.js"&gt;&lt;/script&gt;
          &lt;!-- Bootstrap --&gt;
          &lt;script src="bower_components/bootstrap/dist/js/bootstrap.min.js"&gt;&lt;/script&gt;
          &lt;link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"&gt;
          &lt;link rel="stylesheet" href="css/style.css"&gt;
          &lt;!-- 1. Load libraries --&gt;
          &lt;!-- Polyfill(s) for older browsers --&gt;
          &lt;script src="node_modules/core-js/client/shim.min.js"&gt;&lt;/script&gt;
          &lt;script src="node_modules/zone.js/dist/zone.js"&gt;&lt;/script&gt;
          &lt;script src="node_modules/reflect-metadata/Reflect.js"&gt;&lt;/script&gt;
          &lt;script src="node_modules/systemjs/dist/system.src.js"&gt;&lt;/script&gt;
          &lt;!-- 2. Configure SystemJS --&gt;
          &lt;script src="systemjs.config.js"&gt;&lt;/script&gt;
          &lt;script&gt;
              System.import('app').catch(function (err) {
                  console.error(err);
              });
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;!-- 3. Display the application --&gt;
      &lt;body&gt;
          &lt;my-app&gt;Loading...&lt;/my-app&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>home.html:</p>
  
  <pre><code>&lt;nav class="navbar"&gt;
      &lt;div class="container-fluid"&gt;
          &lt;!-- Brand and toggle get grouped for better mobile display --&gt;
          &lt;div class="navbar-header"&gt;
              &lt;button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"&gt;
                  &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt;
                  &lt;span class="icon-bar"&gt;&lt;/span&gt;
                  &lt;span class="icon-bar"&gt;&lt;/span&gt;
                  &lt;span class="icon-bar"&gt;&lt;/span&gt;
              &lt;/button&gt;
              &lt;a class="navbar-brand" href="#"&gt;Portfolio&lt;/a&gt;
          &lt;/div&gt;
  
          &lt;!-- Collect the nav links, forms, and other content for toggling --&gt;
          &lt;div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"&gt;
              &lt;ul class="nav navbar-nav"&gt;
                  &lt;li class="active"&gt;&lt;a href="#"&gt;Home &lt;span class="sr-only"&gt;(current)&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#"&gt;Over&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#"&gt;Portfolio&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#"&gt;C.V.&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
              &lt;ul class="nav navbar-nav navbar-right"&gt;
                  &lt;li&gt;&lt;a routerLink="/login"&gt;login&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#"&gt;Register&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;&lt;!-- /.navbar-collapse --&gt;
      &lt;/div&gt;&lt;!-- /.container-fluid --&gt;
  &lt;/nav&gt;
  &lt;router-outlet&gt;&lt;/router-outlet&gt;
  &lt;h1&gt;test&lt;/h1&gt;
  </code></pre>
  
  <p>app.module.ts:</p>
  
  <pre><code>import { NgModule }      from '@angular/core';
  import { BrowserModule } from '@angular/platform-browser';
  
  import { AppComponent }  from './app.component';
  import { routing, appRoutingProviders }     from './app.routing';
  
  import { LoginComponent } from '../components/login.component';
  
  @NgModule({
      imports: [
          BrowserModule,
          routing
      ],
      declarations: [
          AppComponent,
          LoginComponent
      ],
      providers: [
          appRoutingProviders
      ],
      bootstrap: [AppComponent]
  })
  export class AppModule { }
  </code></pre>
  
  <p>app.component.ts:</p>
  
  <pre><code>import { Component } from '@angular/core';
  import {ROUTER_DIRECTIVES} from '@angular/router';
  
  @Component({
      selector: 'my-app',
      templateUrl : '../home.html',
      directives: [ROUTER_DIRECTIVES]
  })
  //AppComponent is the root of the application
  export class AppComponent { 
      constructor() {
          console.log("We are up and running!");
      }
  }
  </code></pre>
  
  <p>app.routing.ts:</p>
  
  <pre><code>import { Routes, RouterModule } from '@angular/router';
  
  import { LoginComponent } from '../components/login.component';
  
  const appRoutes: Routes = [
      {
          path: 'login',
          component: LoginComponent,
          //    redirectTo: '/login',
  
          //    pathMatch: 'full'
      }
  ];
  export const appRoutingProviders: any[] = [
      appRoutes
  ];
  
  export const routing = RouterModule.forRoot(appRoutes);
  </code></pre>
  
  <p>login.component.ts:</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { Router }            from '@angular/router';
  
  @Component({
       templateUrl: 'views/login.html'
  })
  export class LoginComponent  {
       constructor() {
          console.log("we have arrived logincomponent");
      }
  }
  </code></pre>
  
  <p>Am I doing something wrong or am I missing something? Anyway thanks for your reply.</p>