title: Pass data from modal to main controller- (Plunker attached)----contains autocomplete input box inside a modal
body: <p>My situation is slightly different than passing normal data from modal to main controller. my input field in modal contains an autocomplete box. </p>
  
  <p>I have the following plunker attached herewith</p>
  
  <p><a href="http://plnkr.co/edit/lpcg6pPSbspjkjmpaX1q?p=preview" rel="nofollow">http://plnkr.co/edit/lpcg6pPSbspjkjmpaX1q?p=preview</a></p>
  
  <pre><code>$scope.ok = function() {
            $modalInstance.close();
  };
  </code></pre>
  
  <p>Once user clicks on 'Add User', a modal opens. We start entering name in the first input field. if we type letter 'a', autocomplete feature shows the options. We select Angular and select 'Scope' and 'Watch' from other 2 dropdown input values.</p>
  
  <p>Now, we press 'ok'. Can someone tell me how to pass the above selected values in the modal to the controller.</p>