title: Dependency Injection with parameterized constructor
body: <p>I'm working around the dependency injection in angular 2.
  I had written a sample service which will not contain any constructor
  My service :</p>
  
  <pre><code>import {Injectable} from '@angular/core'
  
  @Injectable()
  export class MyFirstServiceClass{
    //Not working with parameter
    // constructor(nm:string){   
    // }
    SayHello(){
      alert();
        return "Hello, I'm Service...";
    }
  }
  </code></pre>
  
  <p>I accessed the service via dependency injection from the constructor as follows :</p>
  
  <pre><code>import { Component } from '@angular/core';
  import {MyFirstServiceClass} from './MyFirstService.service'
  
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
  })
  export class AppComponent {
    title = 'app';
    Assignonclick : string;
    constructor(public refsrvc : MyFirstServiceClass){
     this.title = refsrvc.SayHello();
    }
   CallServiceOnBtnClick(){
    this.Assignonclick = this.refsrvc.SayHello();
   }
  
  }
  </code></pre>
  
  <p>It's working if I didnt provide a parameter to the constructor of my service class.
  In case I do the following as like providing the parameter in the constructor, I was not able to perform DI.</p>
  
  <pre><code>@Injectable()
  export class MyFirstServiceClass{
    //Not working with parameter
    constructor(nm:string){   
    }
    SayHello(){
      alert();
        return "Hello, I'm Service...";
    }
  }
  </code></pre>
  
  <p>This is providing me the following image straight forward error :</p>
  
  <p><a href="https://i.stack.imgur.com/BTfki.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BTfki.png" alt="enter image description here"></a>
  How can I perform DI with parameter ?</p>