title: Using Angular how to display in a textbox what is normally shown in a select
body: <p>We have an entry form complete with text boxes and selects and a few radio buttons.  After the user fills in the form, we want to direct them to a confirmation page where they can print if desired the final form as it was submitted.  However, we don't want to show the select fields as dropdowns but rather as simple text boxes. </p>
  
  <p>As an example, the select for State has an ng-options="s.value as s.text for s in states">, where s.value might be "WA" and s.text is "Washington"</p>
  
  <p>On the confirmation page, we wish to show only a text box filled with the text "Washington"</p>
  
  <p>What is the most angular way of doing this?  </p>
  
  <p>I ended up creating this function in the controller:</p>
  
  <pre><code>   $scope.getLookupText = function(lookupValues, value) {
          if (lookupValues == undefined) return '';
          for (var i = 0; i &lt; lookupValues.length; i++)
              if (lookupValues[i].value == value)
                  return lookupValues[i].text;
          return '';
      }
  </code></pre>
  
  <p>and calling it from the template like this:</p>
  
  <p>input id="state" ng-value="getLookupText(states, incident.CustState)"</p>