How to solve the error Cannot resolve all parameters for 'X' is decorated with Injectable in angular 2
<p>I am new to angular 2. I am trying to learn the services in angular by following one yutube video. <a href="https://www.youtube.com/watch?v=SEM6-TkuOgo&amp;list=PL55RiY5tL51olfU2IEqr455EYLkrhmh3n&amp;index=7" rel="nofollow">Angular 2 Tutorial (2016) - Services</a></p>

<p>But I am getting error </p>

<blockquote>
  <p>Cannot resolve all parameters for 'ContactListComponent'(?). Make sure
  that all the parameters are decorated with Inject or have valid type</p>
</blockquote>

<p>How can I solve my issue.</p>

<p>My codes are given below</p>

<p>contact.ts</p>

<pre><code>export interface Contact {
    firstname : string,
    lastname  : string,
    address   : string
}
</code></pre>

<p>mock-contact.ts</p>

<pre><code>import {Contact} from "./contact";

export const CONTACTS:  Contact[] =[
    {firstname : "John", lastname : "A", address : "john home"},
    {firstname : "David", lastname : "B", address : "david home"},
    {firstname : "Johnson", lastname : "C", address : "Johny home"},
    {firstname : "Bobby", lastname : "D", address : "Bobby home"},
];
</code></pre>

<p>contact.service.ts</p>

<pre><code>import { Injectable } from 'angular2/core';
import { CONTACTS } from "./mock-contact";

@Injectable()

export class ContactService {

    getContacts(){
        return Promise.resolve(CONTACTS);
    }
}
</code></pre>

<p>contact-list.component.ts</p>

<pre><code>import {Component} from 'angular2/core';
import {ContactComponent} from "./contact.component";
import { ContactService } from './contact.service';
import {Contact} from './contact';
import {OnInit} from 'angular2/core';
@Component({
    selector : "contact-list"
    template : `
        &lt;ul&gt;
            &lt;li *ngFor="#contact of contacts"
            (click)="onSelect(contact)" [class.clicked] ="  selectedContact === contact"&gt;
                {{contact.firstname}}s App
            &lt;/li&gt;
        &lt;/ul&gt;
        &lt;contact [contact]="selectedContact"&gt;&lt;/contact&gt; 
    `,
    styleUrls: ["../src/css/app.css"],
    providers : [ContactService]
    directives : [ContactComponent],
})

export class ContactListComponent implements OnInit {
    public contacts : Contact[];

    public selectedContact = {};

    constructor(private _contactService: ContactSevice) {}

    onSelect(contact){
        this.selectedContact = contact;
    }

    getContacts(){
        this._contactService.getContacts().then((contacts:Contact[]) =&gt; this.contacts = contacts)
    }
    ngOnInit():any{
        this.getContacts();
    }
}
</code></pre>

<p>Can anyone help me to solve this issue? I am really stuck on this problem. </p>