What is best practice to create an AngularJS 1.5 component in Typescript?
<p>I am experimenting with the <code>.component()</code> syntax in Angular 1.5.</p>

<p>It seems that the latest fashion is to code the controller in-line in the component rather that in a separate file, and I can see the advantage of that given that the component boilerplate is minimal.</p>

<p>The problem is that I having been coding my controllers as typescript classes and would like to continue doing so because that seems to be consistent with Angular2.</p>

<p>My best effort is something like this:</p>

<pre><code>export let myComponent = {
  template: ($element, $attrs) =&gt; {
    return [
      `&lt;my-html&gt;Bla&lt;/my-html&gt;`
    ].join('')
  },
  controller: MyController
};
class MyController {

}
</code></pre>

<p>It works, but it's not elegant. Is there a better way?</p>