title: angular bootstrap UibModal with component error
body: <p>I am trying to use angular bootstrap UibModal with AngularJS 1.5 component using typescript. </p>
  
  <p>I have defined the component and the component's controller is a class. Now when I do $uibModal.open(...), it finds the component but couldn't load the controller. It fails with this error </p>
  
  <pre><code>"Error: [$injector:unpr] Unknown provider: Provider &lt;-  &lt;- TempController"
  </code></pre>
  
  <p>My code is as below:-</p>
  
  <p>Component:-</p>
  
  <pre><code> export function TempComponent(): ng.IComponentOptions {
    return {
      bindings: {
        resolve: '&lt;',
        close: '&amp;',
        dismiss: '&amp;'
      },
      controller: TempController,
      controllerAs: 'vm',
      template: require('./Temp.html')
    };
  }
  
  
  angular
    .module('moduleName')
    .component('tempComponent', TempComponent());
  </code></pre>
  
  <p>Controller:-</p>
  
  <pre><code>export class TempController {
  
    public static $inject: string[] = [''];
  
    public someData: string;
  
    public resolve?: { [key: string]: string | Function | Array&lt;string | Function&gt; | Object };
  
    public close: Function;
    public dismiss: Function;
  
  
    public $onInit(): void {
      this.someData= &lt;string&gt;this.resolve.someData;
    }
  
    public ok(): void {
      this.close();
    }
  
    public cancel(): void {
      this.dismiss('cancel');
    }
  }
  
  angular.module('moduleName')
    .controller('tempController', TempController);
  </code></pre>
  
  <p>Using UIBModal:-</p>
  
  <pre><code>$uibModal.open({component: tempComponent, resolve: .......})
  </code></pre>
  
  <p>Can anyone please guide me what I am doing wrong ? </p>