title: How to use ngSwitch in angular2
body: <p>Since last two days I am trying to get <code>ngSwitch</code> to work in <em>Angular 2.1.0</em>. But it seems impossible to get it work.</p>
  
  <p>I always get:</p>
  
  <blockquote>
    <p>No provider for NgSwitch</p>
  </blockquote>
  
  <p>Below is my code:</p>
  
  <p>Template: </p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;template [ngSwitch]="buttonSelector"&gt;
    &lt;a class="btn" [ngClass]="buttonSizeClass" *ngSwitchCase="'link'" href="#"&gt;
      &lt;span class="btn__text"&gt;
        &lt;ng-content&gt;&lt;/ng-content&gt;
      &lt;/span&gt;
    &lt;/a&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>Component:</p>
  
  <pre class="lang-ts prettyprint-override"><code>import { Component, OnInit, Input } from '@angular/core';
  
  
  @Component({
    selector: 'app-inked-btn',
    templateUrl: './inked-btn.component.html',
    styleUrls: ['./inked-btn.component.css'],
    inputs: ['buttonSize', 'buttonType', "buttonSelector"]
  })
  export class InkedBtnComponent implements OnInit {
    public buttonSize: string;
    public buttonType: string;
    public buttonSelector: string;
    public buttonSizeClass: any;
  
    constructor() { }
  
    ngOnInit() {
      this.buttonSizeClass = {
        'btn--lg': this.buttonSize === 'large',
        'btn--sm': this.buttonSize === 'small',
        'btn--primary': this.buttonType === 'primary'
      }
    }
  
  }
  </code></pre>
  
  <p>Below is my module configuration: </p>
  
  <pre class="lang-ts prettyprint-override"><code>import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
  import { CommonModule } from '@angular/common';
  import { RouterModule } from '@angular/router';
  import { HeaderComponent } from './header/header.component';
  import { FooterComponent } from './footer/footer.component';
  import { InkedBtnComponent } from './inked-btn/inked-btn.component';
  
  @NgModule({
    imports: [
      CommonModule,
      RouterModule
    ],
    declarations: [HeaderComponent, FooterComponent, InkedBtnComponent],
    exports: [HeaderComponent, FooterComponent, InkedBtnComponent],
    schemas: [CUSTOM_ELEMENTS_SCHEMA]
  })
  export class SharedModule { }
  </code></pre>
  
  <p>This shared module is then imported in the main module.</p>
  
  <p>Where is the miss?</p>