title: How to use angular component with ui.bootstrap.modal in angular 1.5?
body: <p>I'd like to use angular component with ui.bootstrap.modal.  angular version is 1.5.<br>
  I tried to use like below.</p>
  
  <p><strong>component</strong>  </p>
  
  <pre><code>function MyComponentController($uibModalInstance){
    var ctrl = this;
  
    ctrl.doSomething = function() {
      //doSomething
    }
  }
  
  app.component('myComponent', {
    contoller: MyComponentController,
    templateUrl: '/path/to/myComponent.html'
  }
  </code></pre>
  
  <p><strong>parent controller</strong></p>
  
  <pre><code>function parentController($uibModal){
    var ctrl = this;
  
    ctrl.openModal = function(){
      var modalInstance = $uibModal.open({
        template: '&lt;my-component&gt;&lt;/my-component&gt;'
  
    }
  }
  </code></pre>
  
  <p>And when I execute <code>parentController.openModal()</code> , I got the error of <a href="https://docs.angularjs.org/error/$injector/unpr?p0=$uibModalInstanceProvider%20%3C-%20$uibModalInstance">$injector:unpr Unknown Provider</a> although modal window is open.<br>
  Is there a way to use angular component with ui.bootstrap.modal? 
  If you need more information, please let me know that.<br>
  Thank you.</p>
  
  <p><strong>EDIT</strong><br>
  I've got a way to use component with ui.bootstrap.modal from Renato Machado, Thanks Renato.<br>
  But I feel It's a little bit complicated and not convenient. So finally I think that it's better to use component inside the modal.<br>
  Modal is opened with regular way(just set controller and template in <code>$uibModal.open({})</code> ) and the modal contains the component which has logics you want to use commonly.<br>
  Modal should have only simple logics that are related with modal like close modal window.<br>
  Another logics mainly related with business/Application should be in component.<br>
  It makes easy to commonalize.</p>