title: Display dropdown values based on textbox value
body: <p>I have one textbox and one dropdown. The textbox value, I am displaying whatever I am getting from response. </p>
  
  <p>For example, </p>
  
  <p>Dropdown values are,</p>
  
  <p>$scope.newPlan = ["A","I","B","II","C","III"]; </p>
  
  <p>And my Textbox value is "A". The condition is, if my textbox value is "A", I need to show only "I" in a dropdown and remaining I don't want to show. Same as,</p>
  
  <p>"A" -> "I"</p>
  
  <p>"B" -> "II"</p>
  
  <p>"C" -> "III"</p>
  
  <p>I am using angularjs. How can I display this in a dropdown.</p>
  
  <p><a href="https://i.stack.imgur.com/XDZ9O.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XDZ9O.png" alt="Image"></a></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>It is ahowing all the values.
  
  $scope.newPlan = ["A", "I", "B", "II", "C", "III"];
  $scope.textboxValue = "A";
  if ($scope.existingPlan == "A") {
    $scope.gpasPlan = $scope.newPlan[1];
  } else if ($scope.existingPlan == "B") {
    $scope.gpasPlan = $scope.newPlan[3];
  } else if ($scope.existingPlan == "C") {
    $scope.gpasPlan = $scope.newPlan[5];
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;select required name="selectnewPlan" ng-model="gpasPlan" ng-options="item for item in newPlan"&gt;
     &lt;option value=""&gt;--Choose New Plan--&lt;/option&gt;
  &lt;/select&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>How can I do this..</p>