DI constructor with optional parameters
<p>My constructor has optional parameters and they seem to mess with the predominant way of doing DI.</p>

<pre><code>constructor(public name:string, public age?:number, private _service:Service);
</code></pre>

<p>Typescript understandably doesn't like that I put a non optional parameter behind an optional one, furthermore the service doesn't get injected when the optional parameter isn't set. How do I solve that? I can't put it somewhere else in the constructor since I would be expected setting the service manually. </p>

<p>Is there something like field injection?</p>

<pre><code>@Inject() private _service:Service;

constructor(public name:string, public age?:number);
</code></pre>

<p>Should I replace the optional parameters with default values? Any other suggestions?</p>

<p><strong>EDIT:</strong>
As discussed below, I tried to inject a service into an object that isn't created by Angular's DI. This doesn't work. Since I can't create this class (model) using DI I now pass the service manually from the class that instantiates this objects. </p>