title: Uncaught (in promise): Error: Cannot match any routes: ' '
body: <p>I just started learning Angular2 and created a sample project in which i need to route between three pages.</p>
  
  <p>I created a RouterModule in the app.module.ts as the following</p>
  
  <pre><code>@NgModule({
    imports: [
      BrowserModule,
      HttpModule,
      FormsModule,
  
      RouterModule.forRoot([
      {path:'login',component : loginComponent},
      {path:'logout',component :logoutComponent},
      {path:'home',component : homeComponent}
  
  ])
  </code></pre>
  
  <p>my app.component.ts is as the following:</p>
  
  <pre><code>@Component({
    selector: 'my-app', // &lt;my-app&gt;&lt;/my-app&gt;
    providers: [Wakanda],
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.scss']
  })
  </code></pre>
  
  <p>my loginComponent.ts</p>
  
  <pre><code>@Component({
      selector:'login',
      template : `
      &lt;h1&gt;Login&lt;/h1&gt;
      `
  })
  </code></pre>
  
  <p>my logoutComponent.ts</p>
  
  <pre><code>@Component({
      selector:'logout',
      template : `
      &lt;h1&gt;Login&lt;/h1&gt;
      `
  })
  </code></pre>
  
  <p>my homeComponent.ts</p>
  
  <pre><code>@Component({
      selector : 'home',
      template : `
      &lt;h1&gt;Login&lt;/h1&gt;
      `
  })
  </code></pre>
  
  <p>my app.component.html </p>
  
  <pre><code>&lt;header&gt;
      &lt;nav&gt;
      &lt;div class="nav-wrapper"&gt;
        &lt;ul class="right hide-on-med-and-down"&gt;
          &lt;li&gt; 
              &lt;a routerLink ="./home"&gt;Home&lt;/a&gt; 
          &lt;/li&gt;
          &lt;li class="active"&gt;
              &lt;a routerLink="./login"&gt;LogIn&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;  
              &lt;a routerLink="./logout"&gt;Log out&lt;/a&gt; 
          &lt;/li&gt;
        &lt;/ul&gt;
  
      &lt;/div&gt;
    &lt;/nav&gt;
  &lt;/header&gt;
  &lt;main&gt;
      &lt;router-outlet&gt;&lt;/router-outlet&gt;
  &lt;/main&gt;
  </code></pre>
  
  <p>When i compile the program i am getting an error as </p>
  
  <blockquote>
    <p>EXCEPTION: Uncaught (in promise): Error: Cannot match any routes: ''</p>
  </blockquote>
  
  <p>Can anyone help me in solving this issue</p>
  
  <p>Thanks in advance</p>