Angular 2 passing parameters to constructor throws DI exception
<p>I'm wanting to setup a string property on a component in my constructor, but when I try something like this</p>

<pre><code>@Component({
    selector: 'wg-app',
    templateUrl: 'templates/html/wg-app.html'
})
export class AppComponent {

    constructor(private state:string = 'joining'){

    }
}
</code></pre>

<p>I get a DI Exception</p>

<pre><code>    EXCEPTION: No provider for String! (AppComponent -&gt; String)
</code></pre>

<p>Clearly, the injector is trying to find a 'string' provider, and can't find any.</p>

<p>What sort of pattern should I be using for this type of thing? Eg. passing initial parameters to a component.</p>

<p>Should it be avoided? Should I be Injecting the initial string?</p>