title: Angular 2 - Inject a dependency into a decorator factory
body: <p>Is there a way to inject a dependency into a decorator factory, using Angular's DI? Let's take the following code as a simplified example:</p>
  
  <pre><code>@Component({
    selector: 'hello-component',
    template: '&lt;div&gt;Hello World&lt;/div&gt;'
  })
  export class HelloComponent {
    @PersonName()
    name: string;
  
    ngAfterViewInit() {
      console.log(`Hello, ${this.name}`);
    }
  }
  </code></pre>
  
  <p>Here, the intended behaviour of the <code>PersonName</code> decorator is for it to access a <code>Person</code> dependency, and use it to set the <code>name</code> property of the class.</p>
  
  <p>Is it possible at all to implement the <code>PersonName</code> decorator for the code above?</p>