title: Initialize Angular 2 component with attribute
body: <p>Is there any way to pas parameters to the root of an Angular 2 Component? I have been able to do this with the components that are part of the internal component template but not with the root component:</p>
  
  <pre><code>&lt;my-component [test] = "some-val"&gt;&lt;/my-component&gt;
  </code></pre>
  
  <p>On my component:</p>
  
  <pre><code>export class AppComponent implements OnInit {
      test: string;
  
      ngOnInit() {
          console.log(this.test); //test is undefined
      }
  }
  </code></pre>
  
  <p>The reason to do this is use Razor variables to be pass to Angular. Like editing a user for instance. I could do something like:</p>
  
  <pre><code>&lt;edit-form [model] = "@Model.Id" &gt; &lt;/edit-form&gt;
  </code></pre>