title: Angular 4 typescript Decorators are not valid here
body: <p>The following code </p>
  
  <pre><code>let isBrowserFactory2=function(@Inject(PLATFORM_ID) platformId: string){ return isPlatformBrowser(platformId);}
  </code></pre>
  
  <p>Gets the following error:</p>
  
  <pre><code>Decorators are not valid here
  </code></pre>
  
  <p>And this one</p>
  
  <pre><code>let isBrowserFactory=(@Inject(PLATFORM_ID) platformId: string):boolean=&gt; isPlatformBrowser(platformId)
  </code></pre>
  
  <p>Gets the <code>Expression expected</code> error.</p>
  
  <ul>
  <li>Why I can't use typescript's parameter decorators for a function?</li>
  <li>How can I use <code>@Inject()</code> to inject something into a factory method?</li>
  </ul>