title: angularjs $modal close modal
body: <p>Im trying to make an angularjs Modal service.
  I have an controller that opens some modal, in that modal i call original controller functions or access some variables, this part i can make it already.
  I just cant close modal without clicking cancel or ok buttons, o want to make some operations in the modal, call some werbservices and the close modal manually.
  Can anyone help me?</p>
  
  <p>I made an working plunker here:
  <a href="http://plnkr.co/edit/bDqAll8CYwu7DGfSs7FC?p=preview" rel="noreferrer">plunker</a></p>
  
  <pre><code>var modalInstance = $modal.open({
                templateUrl: 'myModalContent2.html',
                controller: ModalInstanceCtrl,
                size: size,
                scope: $scope
  
              });
  </code></pre>