title: Angular 4 HttpClient in Component Can't resolve all parameters
body: <p>I started learning Angular 4 and got to the part with HTTP Client. Right now I'm trying to make an http call from the component (yes, I know I should transfer it to service, but still)</p>
  
  <p>But for some reason, when I try to inject HttpClient into my Component I get the next error:</p>
  
  <blockquote>
    <p>Uncaught Error: Can't resolve all parameters for PromocodeComponent:
    (?).</p>
  </blockquote>
  
  <p>Here's the code of my component:</p>
  
  <pre><code>import { Ticket } from '../../classes/Ticket.class'
  import { Component, Input } from '@angular/core';
  import { HttpClient } from '@angular/common/http';
  
  @Component({
    selector: 'promocode',
    templateUrl: './promocode.template.html',
    styleUrls: ['./promocode.styles.scss']
  })
  export class PromocodeComponent {
    @Input() ticket: Ticket;
    state: String = "normal";
    promocode: String = "";
  
     constructor(private http: HttpClient) {}
  
    promocodeValidate(event): void{
      console.log(this.promocode);
      console.log(event);
      this.http.get('/promocode/asdasda').subscribe(data =&gt; {
        console.log(data);
      });
    }
  }
  </code></pre>
  
  <p>And my app.module.ts:</p>
  
  <pre><code>import { BrowserModule } from '@angular/platform-browser';
  import { NgModule } from '@angular/core';
  import { AppComponent } from './app.component';
  import { MovieBadgeComponent } from './movie-badge/movie-badge.component';
  import { TicketComponent } from './ticket/ticket.component';
  import { PromocodeComponent} from './promocode/promocode.component';
  import { FormsModule } from '@angular/forms';
  import { HttpClientModule } from '@angular/common/http';
  
  
  @NgModule({
    declarations: [
      AppComponent,
      MovieBadgeComponent,
      TicketComponent,
      PromocodeComponent
    ],
    imports: [
      BrowserModule,
      HttpClientModule,
      FormsModule
    ],
    providers: [],
    bootstrap: [ AppComponent ]
  })
  export class AppModule {}
  </code></pre>